Mosaics multiple input rasters into a single raster dataset. The target raster must be an existing raster dataset, which can be an empty raster dataset or one already containing data.
Mosaic is useful when a set of adjacent raster datasets needs to be merged into one entity and also when minimizing the abrupt changes along the boundaries of the overlapping rasters.
The overlapping areas of the mosaic can be handled in several ways; for example, you can set the tool to keep only the first raster dataset's data, or you can blend the overlapping cell values. There are also several options to determine how to handle a colormap, if the raster dataset uses one. For example, you can keep the colormap of the last raster dataset used in the mosaic.
For mosaicking of discrete data, the First, Last, Minimum, or Maximum options will give the most meaningful results. The Blend and Mean options are best suited for continuous data.
Whenever possible, use Last mosaic option to mosaic raster datasets to an existing raster dataset in File geodatabase or ArcSDE geodatabase; it is by far the most effective way to mosaic.
The pixel type will be the same as the target raster dataset.
When mosaicking with raster datasets containing colormaps, it is important to note differences across the colormaps for each raster dataset you choose to mosaic. You are still able to use Mosaic tool even if the raster datasets have different colormaps; however, you must choose the proper colormap mode. If an improper colormap mode is chosen, your output might not turn out as you expected.
For floating-point input raster datasets of different resolutions, it is recommended that you esample all the data using bilinear interpolation or cubic convolution before running Mosaic. Otherwise, Mosaic will automatically resample the rasters using nearest neighbor (which is not appropriate for the continuous type of data).
The Mosaic tool doesn't use the Output Extent, because the tool tends to create very large raster datasets, and the Output Extent setting might accidentally clip your data. If output extent does need to be adjusted, the Clip tool can achieve that operation.
|Input Rasters (Required)||
The input raster datasets.
|Target Raster (Required)||
The target raster dataset.
This raster dataset must already exist.
|Mosaic Method (Optional)||
The method used to mosaic overlapping areas.
|Mosaic Colormap Mode (Optional)||
The method used to choose which colormap from the input rasters will be applied to the mosaic output.
|Ignore Background Value (Optional)||
Specifies the pixel value in the raster dataset that would be recognized as a background value, and not a valuable part of the data. The pixel value specified will be set to NoData in the output raster dataset. Use this option after rotating or projecting an image to remove the unwanted values created around the original raster data. Even if this value is not unique in the dataset, it will be distinguished from other valuable data in the raster dataset. For example, a value of zero along the raster dataset's borders will be distinguished from zero values within the raster dataset.
|Nodata Value (Optional)||
All the pixels with the specified value will be set to NoData in the output raster dataset.
|Convert 1 bit data to 8 bit (Optional)||
Choose whether the input 1-bit raster dataset will be converted to an 8-bit raster dataset. In this conversion the value 1 in the input raster dataset will be changed to 255 in the output raster dataset. This is useful when importing a 1-bit raster dataset to ArcSDE. 1-bit raster datasets have 8-bit pyramid layers when stored in a file system, but in ArcSDE, 1-bit raster datasets can only have 1-bit pyramid layers, which makes the display unpleasant. By converting the data to 8-bit in ArcSDE, the pyramid layers are built as 8-bit instead of 1-bit, resulting in a properly appearing raster dataset in the display.
|Mosaicking Tolerance (Optional)||
When mosaicking takes place, the target and the source pixels do not always line up exactly. When there is a misalignment of pixels, a decision needs to be made whether resampling takes place or whether the data should be shifted. The mosaicking tolerance controls whether resampling of the pixels take place or if the pixels should be shifted.
If the difference in pixel alignment (of the incoming dataset and the target dataset) is greater than the tolerance, resampling will take place.
If the difference in pixel alignment (of the incoming dataset and the target dataset) is less than the tolerance, resampling will not take place (instead, a shift is performed).
The unit of tolerance is a pixel; the valid value range is 0 to 0.9999. The maximum a pixel can be shifted is 0.5, so anything you set that is greater than 0.5 will guaranty a shift takes place. A tolerance of zero guaranty resampling if there is a misalignment in pixels.
For example, the source and target pixels have a misalignment of 0.25. If the mosaicking tolerance is set to 0.2, then resampling will take place since the pixel misalignment is greater than the tolerance. If the mosaicking tolerance is set to 0.3, then the pixels will be shifted.
# Mosaic_sample.py # Description: Mosaic rasters to an existing raster dataset # Requirements: None # Author: ESRI # Date: 1/28/04 import arcgisscripting gp = arcgisscripting.create() gp.workspace = "c:/redlands_data" gp.Mosaic_management("redlands1.tif; redlands2.tif" , "Database Connections\Connection to raster.sde\raster.redlands","LAST","MATCH", "0", "#", "NONE", "0")