Raster Catalog To Raster Dataset (Data Management)
Summary
Mosaics the contents of a raster catalog into a new raster dataset.
Usage
-
This tool allows you to convert your geodatabase raster catalog into a raster dataset; the input is a raster catalog and the output is a new raster dataset. This tool cannot mosaic data into an existing raster dataset.
-
There are several advantages of using a mosaicked raster dataset: it tends to display faster at any scale, saves space since there is no overlapping data, and the data tends to display with fewer seams.
-
You must set the pixel type to match your existing input raster datasets. If you do not set the pixel type, the 8-bit default will be used and your output might turn out incorrectly.
-
You can save your output to BIL, BIP, BMP, BSQ, DAT, GIF, GRID, IMG, JPEG, JPEG 2000, PNG, TIFF, or any geodatabase raster dataset.
-
When storing your raster dataset to a JPEG file, a JPEG 2000 file, or a geodatabase, you can specify a Compression type and Compression Quality within the Environment Settings.
-
The GIF format only supports single-band raster datasets.
-
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, First, Minimum, or Maximum Mosaic Operator options will provide the most meaningful results. The Blend and Mean Mosaic Operator options are best suited for continuous data.
-
Whenever possible, use the Last Mosaic Operator to mosaic raster datasets to an existing raster dataset in a file geodatabase or ArcSDE geodatabase; it is by far the most effective way to mosaic.
-
When mosaicking with raster datasets containing colormaps, it is important to note differences across the colormaps for each raster dataset you choose to mosaic. In this situation, use the Mosaic tool for raster with different colormaps; however, you must choose the proper Mosaic Colormap Mode operator. 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 or when cells are not aligned, it is recommended to resample all the data using bilinear interpolation or cubic convolution before running Mosaic; otherwise, Mosaic will automatically resample the raster datasets using nearest neighbor resampling, which is not appropriate for continuous data types.
-
Color matching and color correction can be used to make the raster mosaic more seamless.
Syntax
Parameter | Explanation | Data Type |
in_raster_catalog |
The raster catalog that will be mosaicked to a raster dataset. | Raster catalog |
out_raster_dataset |
The name and extension of the output raster dataset mosaic. When storing the raster dataset in a file format, you need to specify the file extension:
When storing a raster dataset in a geodatabase, no file extension should be added to the name of the raster dataset. When storing your raster dataset to a JPEG file, a JPEG 2000 file, a TIFF file, or a geodatabase, you can specify a compression type and compression quality. | Raster dataset |
where_clause (Optional) |
Enter the appropriate SQL statement to select specific rows in the raster catalog. | SQL expression |
mosaic_type (Optional) |
The method used to mosaic overlapping areas.
For more information about each mosaic operator, refer to Mosaic Operator. | String |
colormap (Optional) |
The method used to choose which colormap from the input rasters will be applied to the mosaic output.
For more information about each colormap mode, refer to Mosaic colormap mode. | String |
order_by_field (Optional) |
Define the field by which to order the raster catalog items. | Field |
ascending (Optional) |
Choose whether to use the ascending value of the Order By field. If the Ascending option is not used, the descending order will be used.
| Boolean |
Pixel_type (Optional) |
Determines the bit depth of the output raster dataset. If left unspecified, the output bit depth will be the same as the input. There will be no rescaling of the raster values when a different pixel type is chosen. If the pixel type is demoted (lowered), the raster values outside the valid range for that pixel depth will be truncated and lost.
| String |
ColorBalancing (Optional) |
Choose whether or not to use a dodging technique to color correct the raster catalog items. All pixels in the raster catalog will be used to determine the gamma and contrast values for the color-balancing algorithm.
| Boolean |
matchingMethod (Optional) |
Choose the color matching method to apply to the rasters.
| String |
ReferenceRaster (Optional) |
If color matching is applied, choose how to specify the reference raster.
Legacy: Older scripts and models may still use the old keyword. With the ArcGIS 10.0 release, this keyword was replaced with "CALCULATE_FROM_ALL" . Both keywords will continue to work, though for clarity it may be worthwhile to update it to the new keyword. | String |
OID (Optional) |
The object ID (OID) of the reference raster. The OID is a unique key field in the raster catalog. | Long |
Code Sample
This is a Python sample for the RasterCatalogToRasterDataset tool.
import arcpy arcpy.RasterCatalogToRasterDataset_management("c:/data/fgdb.gdb/catalog1", "c:/data/dataset.tif", "OBJECTID>1", "LAST", "FIRST", "", "", "8_BIT_UNSIGNED", "COLOR_BALANCING", "HISTOGRAM_MATCHING", "CALCULATE_FROM_ALL", "")
This is a Python script sample for the RasterCatalogToRasterDataset tool.
##================================== ##Raster Catalog To Raster Dataset ##Usage: RasterCatalogToRasterDataset_management in_raster_catalog out_raster_dataset {where_clause} {LAST | FIRST | MINIMUM | MAXIMUM ## | MEAN | BLEND} {FIRST | REJECT | LAST | MATCH} {order_by_field} {NONE | ASCENDING} ## {8_BIT_UNSIGNED | 1_BIT | 2_BIT | 4_BIT | 8_BIT_SIGNED | 16_BIT_UNSIGNED | ## 16_BIT_SIGNED | 32_BIT_UNSIGNED | 32_BIT_SIGNED | 32_BIT_FLOAT | 64_BIT} ## {NONE | COLOR_BALANCING} {NONE | STATISTIC_MATCHING | HISTOGRAM_MATCHING ## | LINEARCORRELATION_MATCHING} {CACULATE_FROM_ALL | SPECIFY_OID | DEFINE_FROM_SELECTION} ## {OID} try: import arcpy arcpy.env.workspace = r"\\MyMachine\PrjWorkspace\RasGP" ##Mosaic a Unmanaged Raster Catalog to a TIFF format Raster Dataset with Color Correction arcpy.RasterCatalogToRasterDataset_management("RC2RD\\fgdb.gdb\\catalog1","RC2RD\\dataset1.tif", "OBJECTID>1", "LAST", "FIRST", "", "",\ "8_BIT_UNSIGNED", "COLOR_BALANCING", "HISTOGRAM_MATCHING", "CALCULATE_FROM_ALL", "") ##Mosaic using the According Order of cretain Field arcpy.RasterCatalogToRasterDataset_management("RC2RD\\fgdb.gdb\\catalog2","RC2RD\\dataset2.tif", "", "LAST", "FIRST", "POPULATION", \ "ASCENDING", "8_BIT_UNSIGNED", "COLOR_BALANCING", "HISTOGRAM_MATCHING", "SPECIFY_OID", "2") except: print "Raster Catalog To Raster Dataset example failed." print arcpy.GetMessages()