GEOREF_MOSAIC_SETUP: A routine to estimate output parameters for MOSAIC_DOIT
Note: The below article refers to ENVI Classic.
In order to perform a georeferenced mosaic in batch mode it is necessary to specify the output parameters of the mosaic. These parameters include the output size of the image (xsize, ysize), image offsets (x0, y0), and inherited map information. As a result, ENVI's batch-mode mosaic routine, MOSAIC_DOIT, can be difficult to use properly for map-based mosaicking. In particular, you must estimate where to place the images using map locations and estimate the output size of the mosaicked images before the process begins. The routine included in this Help Article will estimate values for many of the MOSAIC_DOIT input keywords that can be difficult to calculate.
Use this routine before doing a georeferenced mosaic to estimate values for some of the required keywords for MOSAIC_DOIT.
GEOREF_MOSAIC_SETUP, fids=fids, dims=dims, out_ps=out_ps, xsize=xsize, ysize=ysize, x0=x0, y0=y0, map_info=map_info
Entry Keywords. These keywords are necessary to set prior to calling GEOREF_MOSAIC_DOIT. The information they contain will be passed into the routine and returned along with the calculated values of the other keywords.
Long-integer array of file IDs - one for each file to mosaic.
Keyword to specify the spatial dimensions on which to perform the operation. DIMS is a long-integer array with the following definition:
- DIMS[0, *]: Unused for this function, set to -1L.
- DIMS[1, *]: The starting X pixel (the first pixel is number zero).
- DIMS[2, *]: The ending X pixel.
- DIMS[3, *]: The starting Y pixel (the first pixel is number zero).
- DIMS[4, *]: The ending Y pixel.
Use this keyword to specify a two-element floating point or double precision array containing the X and Y pixel sizes, respectively. This is used to estimate the output size of the mosaic.
Returned Keywords. Set these keywords equal to these named variables that will contain the calculated parameter values necessary to use mosaic_doit.
The X size of the output image (sample direction). XSIZE will have the same units as the pixel size.
The Y size of the output image (line direction). YSIZE will have the same units as the pixel size.
A long-integer array of X starting pixels, one for each file. x0 will be in pixel coordinates, which are calculated by converting map locations for georeferenced images to output pixel locations.
A long-integer array of Y starting lines, one for each file. y0 will be in pixel coordinates, which are calculated by converting map locations for georeferenced images to output line locations.
Set this keyword to a named variable which will contain the map projection information of the input files.
This additional functionality is provided free of charge as a service for our ENVI users; however, this procedure is not supported by Exelis VIS Technical Support. The procedure GEOREF_MOSAIC_DOIT has been been tested and we believe that it works correctly, but it is in no way guaranteed.
Download the GEOREF_MOSIAC_SETUP.pro
For an example on how to call MOSAIC_DOIT with GEOREF_MOSAIC_SETUP download EXAMPLE_GEOREF_MOSAIC_FULL.pro
Review on 12/31/2013 MM