Merge vs. Mosaic for Raster Data
(Note: in ArcGIS 9.1 there is now a 'Merge' Tool for Vector data as well...)
See also Mosaicing Images (as opposed to Grids)
Two common methods for combining adjacent or overlapping raster layers are MERGE and MOSAIC. Below are a few notes on the difference between these two tools.
The MOSAIC and MERGE functions work similarly, and both are still available from either command line ArcInfo (GRID) or the Raster Calculator of ArcGIS (Spatial Analyst). However, for geoprocessing from the ArcToolbox, these two functions have now been combined in the single MOSAIC tool.
Neither function will fill gaps between non-adjacent datasets (see Gap notes below).
Raster Calculator (or Command Line ArcInfo)
When the input grids do not have any overlapping area, there is no difference in the output from either MERGE or MOSAIC. The difference is only in the processing of overlapping areas. In the case of MERGE, the sequence of input grids determines the values assigned to cells, giving priority to those entered first. For MOSAIC, overlapping areas were blended to make a smooth transition and the sequence of entry is irrelevant (if on each overlapping area no more than two grids intersect). MOSAIC is typically used for continuous data (such as the spatially adjacent grids representing Digital Elevation Models, satellite images acquired in a slightly different time, containment plumes, etc.)
(Tools / Data Management / Raster / Mosaic or Tools / Data Management / Raster / Mosaic to New Raster)
The MOSAIC tool combines the geoprocessing of both MERGE and MOSAIC. Overlapping areas can be handled in any one of the following manners:
MOSAIC requires an existing Grid as its output. However, MOSAIC TO NEW RASTER is identical to MOSAIC, but outputs to a new Grid.
Small gaps between non-overlapping and/or non-adjacent datasets become NODATA (The MERGE or MOSAIC function will not interpolate to fill missing data between adjacent rasters). The following Map Algebra expression may help to solve the problem by interpolating values of the missing cells. First use MERGE or MOSAIC to combine raster datasets (creating a raster with a gap in it). Then use the following expression from the Raster Calculator to fill gaps of up to three rows or columns of NoData cells with the mean cell value of the 4-x-4 square (leaving the valid existing data unchanged). If the gap is wider than three cells, the size of the focal window may be increased. Using the Raster Calculator, enter the following expression (where 'gap_merge' is the name of your mosaiced grid with gaps in it):
If the gap needs to be eliminated from a mosaic
made up of categorical rasters (where an average or mean value
would not be appropriate), the following approach may be useful:
This function assigns the value of the nearest cell (containing data) to the
cells in the gaps without any averaging of values (a Euclidean distance
HILLSHADE NOTE: (Do not MOSAIC hillshades: MOSAIC the DEM's first and then create a hillshade).
When working with multiple DEM files, it is important to MOSAIC the individual DEM files before creating a hillshade. A hillshade process cannot create any 'shading' at the edges of the dataset (there is nothing to compare the edge cells with). This will create data gaps if two hillshades are MOSAICed - even if the original DEM files did not have a gap...
The standard MERGE and MOSAIC tools in ArcGIS do not work to mosaic image file formats (e.g., adjacent .tif, .jpg or .img files such as air photos, satellite images or scanned maps). To MOSAIC an image file in ArcGIS you must first convert the image file to a GRID (or more typically, to a GRID STACK, which is a combination of Red, Green and Blue GRIDS for the different color bands that make up a multi-band image).
Alternatively, in AH-16, we have the Image Analysis extension available on the Dell computers. This extension does handle the mosaicing of image files (as well as the subsetting or clipping of images, etc.).
The MOSAIC tool in Image Analysis also included Color Balancing and cropping options. Refer to the Image Analysis Help (available from the main drop down list of the Image Analysis toolbar) for more details.