To create mosaics in GeoExpress, create a mosaic text file, that is, a file with the .mos extension. Mosaic files list the images that you want to add to the mosaic, and can be used both for images that do and do not have georeferencing.
The individual input tiles of a mosaic cannot be cropped. The mosaic file can be given any name.
For georeferenced images (TIFF images with .tfw files, JPEG images with .jgw files, BIL, BIP, or BSQ images with supported .hdr files, LAN, GeoTiff, ERDAS IMAGINE, USGS DOQ images or MrSID files), the text in the mosaic file lists the images that you want to add to the mosaic.
In the following example, a mosaic is created from four TIFF files. A sample mosaic file for this project is displayed below:
image_nw.tif
image_ne.tif
image_sw.tif
image_se.tif
The following command creates the mosaic using the mosaic file above:
mrsidgeoencoder -i mosaic.mos -mos -o mosaic.sid
The -mos
switch identifies the input file as a mosaic file.
NOTE: GeoExpress does not recognize mosaic files with spaces in either the listed file names or in the listed paths. In addition, the first line in the file cannot be blank and the last line in the file must be followed by a carriage return.
You can opt to generate a shapefile that includes the boundaries of each tile that makes up the output image. Include the switch -writeboundsshapefile
(or -wbshp
) in your command:
mrsidgeoencoder -i mosaic.mos -mos -o mosaic.sid -writeboundsshapefile
Your job will be created and include the file mosaic.shp
(or whatever name you chose for your output file). You can then use a program such as GeoViewer to load the image and shapefile to see the tile boundaries overlaid on the output image.
When creating a mosaic using images that lack georeferencing information, a mosaic file must be created. In this case, the mosaic file must list the file names and the upper left corner pixel location for each image. Each image must be listed based on the following format:
image_name x-pixel_location y-pixel_location
Only a single space is required between each of the three items in the list. Each image listed must be on a separate text line.
Base the upper left corner pixel location of each image on the location of the image relative to an x=0, y=0 pixel location of the upper left corner of the entire set of images.
Consider an example where a single image is being created from four separate scanned Sun Raster images, each 640 by 480 pixels in size.
The mosaic file requires the following four lines:
image_nw.ras 0 0
image_ne.ras 640 0
image_sw.ras 0 480
image_se.ras 640 480
The sample file above joins the specified images as follows:
NOTE: A positive y value places the image that many pixels from 0,0 in the negative y direction.
Use the -multires
switch with the -mos
switch to allow multiresolution input for a mosaic.
NOTE: Only flat mosaics support tiles with different resolutions.
You can create a mosaic from tiles with different projection systems. Specify an output projection for the tiles using the -toepsg
or -towkt
switch. For more information on specifying an output projection, see Reprojecting Images.
For example, you might enter the following command:
mrsidgeoencoder -i tiles.mos -mos -toepsg 4326 -o output.sid
When you create a mosaic from tiles with multiple projections, GeoExpress enables multiresolution input by default.
There are several things that you should understand and keep in mind when encoding large flat mosaics (for the difference between flat and composite mosaics, see Creating a Mosaic above):