A mosaic is a combination or merge of two or more images. In ArcGIS, you can create a single raster dataset from multiple raster datasets by mosaicking them together. Alternatively, you can create a mosaic dataset and create a virtual mosaic from a collection of raster datasets.
The illustration below shows how six adjacent raster datasets are mosaicked together into one raster dataset.
In many cases, there will be some overlap of the raster dataset edges that are being mosaicked together, as shown below.
These overlapping areas can be handled in several ways; for example, you can choose to only keep raster data from the first or last dataset, you can blend the overlapping cell values using a weight-based algorithm, you can take the mean of the overlapping cell values, or you can take the minimum or maximum value. When mosaicking discrete data, the First, Minimum, or Maximum options give the most meaningful results. The Blend and Mean options are best suited for continuous data. If any of the input rasters are floating point, the output is floating point. If all the inputs are integer and First, Minimum, or Maximum is used, the output is integer.
The mosaic dataset allows you to choose a variety of other mosaicking methods that are applied to a dynamic mosaic or to an exported, mosaicked raster dataset. These methods include sorting by attributes, using a seamline, and more.
There are also several options to determine how to handle a color map if the raster dataset uses one. You can keep the color map of the first or last raster dataset used in the mosaic or make sure the colors in the final color map are all unique. You can also choose to reject any rasters with a color map from being mosaicked.
You can also choose to perform color corrections on the raster datasets being mosaicked by either choosing to color balance or color match the raster datasets. Color balancing uses a dodging technique to perform the color correction. In this technique, a global gamma value and contrast adjustment are determined for each band, then these values are used to determine the output value for each pixel. This is available when viewing a raster catalog in ArcMap, or on a mosaic dataset, and can be permanently applied when using the Raster Catalog To Raster Dataset tool. Color matching adjusts the pixel values (colors) of the overlap areas between the reference raster to the source rasters. Once the matching algorithm is determined in the overlap areas, it is applied to the source rasters. Color matching can use one of three methods to interpolate the proper color match from the reference raster to the source rasters:
- Statistics Matching—Matches the statistical differences (using minimum, maximum, and mean) between the reference overlap area and the source overlap area, then applies the color transformation to the source datasets.
- Histogram Matching—Matches the histogram from the reference overlap area with the source overlap area, then applies the color transformation to the source datasets.
- Linear Correlation—Matches overlapped pixels and interpolates to the rest of the source. The pixels that do not have a one-to-one relationship will use a weighted average.
Color matching can be performed on a raster catalog when displayed in ArcMap, when using the mosaicking tools, or when viewing a mosaic dataset.
If you are creating a single, large mosaic of many raster datasets, it is recommended that you rebuild pyramids and recalculate statistics on the final mosaicked raster dataset rather than update these items after each input raster dataset is added. This means recalculating statistics on file-based raster datasets, raster datasets within a file geodatabase, or those within a personal geodatabase on the final mosaicked raster dataset. Raster datasets within an ArcSDE geodatabase are exempt from this recommendation because they will have their statistics recalculated as each input is being mosaicked. Rebuilding the pyramid information is also recommended after the mosaic operation for file-based raster datasets or those within a personal geodatabase is complete. However, raster datasets stored within a file geodatabase or an ArcSDE geodatabase support partial pyramid updating; therefore, the pyramids should be built during the mosaic operation rather than after (as long as you have set the upper left coordinate to avoid rebuilding the pyramids for the entire raster dataset).
Other key points about mosaicking raster data include the following:
- A raster dataset that has been created from mosaicking has the same schema as any other raster dataset.
- All the raster datasets and the output raster mosaic must have the same number of bands; otherwise, the mosaic cannot be created.
- If two or more rasters have the same spatial reference and the same pixel size, they can be mosaicked into a single raster. If the second raster has a different spatial reference from the first raster dataset, the spatial reference of the second raster dataset will be ignored and its data transformed into the spatial reference of the first raster dataset. In this case, it is recommended that you use the Project Raster tool to ensure that your data is not compromised.