Home    |    Concepts   |   API   |   Samples
Concepts > Rasters > Basic Principles
Mosaics

The mosaic operation merges georeferenced raster data. Mosaicking is the process performed by the mosaic operation that allows you to merge georeferenced images or raster datasets to a seamless raster dataset. Mosaicking creates a raster dataset that is no different in schema from any other raster dataset. ArcSDE requires that the source input raster (either an image or a raster dataset) has the following properties that agree with the target raster dataset to which it will be mosaicked:

  • Cell size
  • Cell registration
  • Number of bands
  • Pixel bit depth
If any of these properties are out of agreement, ArcSDE will reject the source input. It is up to the ArcSDE client program to resample the source input to provide agreement in cell alignment and cell size.

Mosaics can be displayed very quickly and are useful if the underlying data is not changing or any overlap of the images is inconsequential. However, in the case of large mosaics, the creation can be time-consuming due to the processing that is required. Preprocessing steps that may be required depend on the loading tools used, but may include pixel alignment, color balancing, and projection. During loading, processing includes the creation of pyramids and calculation of statistics, typically completed after all the individual images have been loaded.

For color mapped imagery, mosaicking requires that the color map be dropped from the target raster dataset. Once mosaicking is complete, a composite color map can be added to the target.

An alternative to mosaicking is to insert the source input rasters as separate records in a raster catalog. A raster catalog displays many individual rasters as a seamless layer without having to mosaic them. These are typically useful if the data in the catalog has to be updated frequently or if there is a requirement for maintaining data in areas where images overlap. However, it is also possible to mosaic source images to the individual records of a raster catalog. Raster data can be grouped together into a raster catalog by mosaicking data together that agrees in pixel bit depth, number of bands and cell registration, and alignment.

Mosaciked Raster Datasets vs Raster Catalogs

  Description Properties Render Speed Overlap
Mosaic Raster Datasets Single raster dataset for multiple rasters All properties must be the same. For ex:
  • Spatial Reference
  • Data type
  • Colormap
  • Set of pyramids
  • Tile Size
Quicker, only needs one set of properties Lose overlapping pixels
Raster Catalogs A collection of independent raster datasets Properties can be different

 

Slower, must read each set of properties Overlap preserved.

It is typical to mosaic data that has been generated from the same source, such as an aerial photo flight. However, given the sophistication of the ArcSDE client application, it is possible to convert source imagery so that it can be mosaicked together assuming that such a task is necessary given the requirements of the application.

The Raster API provides three modes of mosaicking:

  • SE_MOSAIC_NONE (0)—Mosaic mode OFF
  • SE_MOSAIC_MERGE (1)—Mosaic mode ON
  • SE_MOSAIC_DELETE (2)—Mosaic mode ON, with the following merge policy:

    For pixels in two overlapping tiles, if the new pixel's bitmask is 0, set the old pixel to nodata. If it is 1, do nothing. Pixels that have been set to nodata will not be displayed. This mosaic operation can be thought of as an erase operation.

LONG rc, mosaic_mode;
SE_RASTERATTR *raster_attrib;
rc = SE_rasterattr_set_mosaic_mode (*raster_attrib, mosaic_mode);
SeRasterAttr attr = ......;
int mosaicMode = x; //0 < x < 2
attr.setMosaicMode(mosaicMode);


feedback | privacy | legal