This routine is obsolete and has been replaced by ENVIMosaicRaster.

Use this procedure to overlay two or more images with overlapping areas (typically georeferenced) or to overlay non-overlapping images (typically pixel-based). You can mosaic individual bands, entire files, and georeferenced images.

Syntax


ENVI_DOIT, 'MOSAIC_DOIT' [, BACKGROUND=integer], DIMS=array, FID=file ID [, /GEOREF] [, /IN_MEMORY] [, MAP_INFO=structure] [, OUT_BNAME=string array], OUT_DT={1 | 2 | 3 | 4 | 5 | 6 | 9 | 12 | 13 | 14 | 15}, OUT_NAME=string, PIXEL_SIZE=array, POS=array [, R_FID=variable] [, /SEE_THROUGH_VAL], USE_SEE_THROUGH=array, XSIZE=integer, X0=array, YSIZE=integer, Y0=array

Keywords


BACKGROUND (optional)

Use this keyword to specify the value for all background pixels. The default is 0.

DIMS

The “dimensions” keyword is a five-element array of long integers that defines the spatial subset (of a file or array) to use for processing. Nearly every time you specify the keyword FID, you must also specify the spatial subset of the corresponding file (even if the entire file, with no spatial subsetting, is to be processed).

  • DIMS[0]: A pointer to an open ROI; use only in cases where ROIs define the spatial subset. Otherwise, set to -1L.
  • DIMS[1]: The starting sample number. The first x pixel is 0.
  • DIMS[2]: The ending sample number
  • DIMS[3]: The starting line number. The first y pixel is 0.
  • DIMS[4]: The ending line number

To process an entire file (with no spatial subsetting), define DIMS as shown in the following code example. This example assumes you have already opened a file using ENVI_SELECT or ENVI_PICKFILE:

  envi_file_query, fid, dims=dims

FID

Use this keyword to specify a long-integer array of file IDs, one for each file to mosaic. The file ID is the value returned by the R_FID keyword to the ENVI_OPEN_FILE procedure or the FID keyword to ENVI_SELECT.

GEOREF (optional)

Set this keyword to indicate that the data are georeferenced, in which case you must define the keyword MAP_INFO.

IN_MEMORY (optional)

Set this keyword to specify that output should be stored in memory. If you do not set IN_MEMORY, output will be stored on disk and you must specify OUT_NAME (see below).

MAP_INFO (optional)

Use this keyword to specify map information. Set MAP_INFO equal to the structure returned from ENVI_GET_MAP_INFO or ENVI_MAP_INFO_CREATE.

OUT_BNAME (optional)

Use this keyword to specify a string array of output band names.

OUT_DT

This keyword indicates the IDL data type of the output data. Set the keyword to one of the following integer values:

  • 1: Byte (8 bits)
  • 2: Integer (16 bits)
  • 3: Long integer (32 bits)
  • 4: Floating-point (32 bits)
  • 5: Double-precision floating-point (64 bits)
  • 6: Complex (2x32 bits)
  • 9: Double-precision complex (2x64 bits)
  • 12: Unsigned integer (16 bits)
  • 13: Unsigned long integer (32 bits)
  • 14: Long 64-bit integer
  • 15: Unsigned long 64-bit integer

OUT_NAME

Use this keyword to specify a string with the output filename for the resulting data. If you set the keyword IN_MEMORY, you do not need to specify OUT_NAME.

PIXEL_SIZE

Use this keyword to specify a two-element array of floating-point or double-precision values containing the x and y pixel sizes, respectively. For pixel-based mosaics, set the x and y pixel sizes to 1.0, for example, PIXEL_SIZE=[1.0, 1.0].

POS

Use this keyword to specify an array of long integers representing band positions to include in the mosaic. The dimensions of the array must be [#output bands, #files]. A value of -1 indicates that no input band for the associated file is included in the corresponding mosaicked output band. The valid values for POS are 0 to num_bands (for the corresponding file), or -1.

R_FID (optional)

ENVI Classic library routines that result in new images also have an R_FID, or “returned FID.” This is simply a named variable containing the file ID to access the processed data. Specifying this keyword saves you the step of opening the new file from disk.

SEE_THROUGH_VAL (optional)

Use this keyword to set the see-through value for each input file. SEE_THROUGH_VAL is an array of values with the same data type as OUT_DT with [#files] elements. If a pixel in the input file is equal to its corresponding value of SEE_THROUGH_VAL, then that pixel is not transferred to the output mosaic, which allows data stacked underneath to remain visible. If any elements of the array USE_SEE_THROUGH have a value of 1, then you must specify the SEE_THROUGH_VAL array.

USE_SEE_THROUGH

Use this keyword to specify an integer array of zeros and ones indicating whether the bands from the current file will use the corresponding SEE_THROUGH_VAL value. A value of 1 indicates that the input file will use SEE_THROUGH_VAL, and a value of 0 indicates that SEE_THROUGH_VAL will not be used. The number of elements in the USE_SEE_THROUGH array is equal to the number of input files specified by FID.

XSIZE

Use this keyword to set the x size of the output image (sample direction). For pixel-based mosaics, the XSIZE is in pixels and the corresponding pixels size is [1, 1]. For georeferenced images, XSIZE has the same units as PIXEL_SIZE. For example, a 1 km image in the sample direction uses a PIXEL_SIZE of 1 m and an XSIZE of 1,000 m.

X0

Use this keyword to specify an array of long integers representing the x starting pixels, one for each file. X0 is in pixel coordinates and may require you to convert map locations to output pixel locations in georeferenced images.

YSIZE

Use this keyword to set the y size of the output image (line direction). For pixel-based mosaics, the YSIZE is in pixels and the corresponding pixels size is [1, 1]. For georeferenced images, YSIZE has the same units as PIXEL_SIZE. For example, a 1 km image in the line direction uses a PIXEL_SIZE of 1 m and an YSIZE of 1,000 m.

Y0

Use this keyword to specify an array of long integers representing the y starting lines, one for each file. Y0 is in pixel coordinates and may require you to convert map locations to output line locations in georeferenced images.