Raster Catalog To Raster Dataset (Data Management)

License Level:BasicStandardAdvanced

Summary

Mosaics the contents of a raster catalog into a new raster dataset.

Usage

Syntax

RasterCatalogToRasterDataset_management (in_raster_catalog, out_raster_dataset, {where_clause}, {mosaic_type}, {colormap}, {order_by_field}, {ascending}, {pixel_type}, {ColorBalancing}, {MatchingMethod}, {ReferenceRaster}, {OID})
ParameterExplanationData Type
in_raster_catalog

The raster catalog that will be mosaicked to a raster dataset.

Raster Catalog Layer
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:

  • .bil—Esri BIL
  • .bip—Esri BIP
  • .bmp—BMP
  • .bsq—Esri BSQ
  • .dat—ENVI DAT
  • .gif—GIF
  • .img—ERDAS IMAGINE
  • .jpg—JPEG
  • .jp2—JPEG 2000
  • .png—PNG
  • .tif—TIFF
  • no extension for Esri Grid

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.

  • FIRSTThe output cell value of the overlapping areas will be the value from the first raster dataset mosaicked into that location.
  • LASTThe output cell value of the overlapping areas will be the value from the last raster dataset mosaicked into that location. This is the default.
  • BLENDThe output cell value of the overlapping areas will be a horizontally weighted calculation of the values of the cells in the overlapping area.
  • MEANThe output cell value of the overlapping areas will be the average value of the overlapping cells.
  • MINIMUMThe output cell value of the overlapping areas will be the minimum value of the overlapping cells.
  • MAXIMUMThe output cell value of the overlapping areas will be the maximum value of the overlapping cells.
  • SUMThe output cell value of the overlapping areas will be the total sum of the overlapping cells.

For more information about each mosaic operator, refer to Mosaic Operator.

String
colormap
(Optional)

The method used to choose which color map from the input rasters will be applied to the mosaic output.

  • FIRSTThe color map from the first raster dataset in the list will be applied to the output raster mosaic. This is the default.
  • LASTThe color map from the last raster dataset in the list will be applied to the output raster mosaic.
  • MATCHWill take all the color maps into consideration when mosaicking. If all possible values are already used (for the bit depth), it will attempt to match the value with the closest color that is available.
  • REJECTOnly the raster datasets that do not have a color map associated with them will be mosaicked.

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.

String
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.

  • AscendingThe ascending order of the rows will be followed in the mosaic procedure. This is the default.
  • NoneThe descending order of the rows will be followed in the mosaic procedure.
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.

  • 1_BITA 1-bit unsigned integer. The values can be 0 or 1.
  • 2_BITA 2-bit unsigned integer. The values supported can be from 0 to 3.
  • 4_BITA 4-bit unsigned integer. The values supported can be from 0 to 15.
  • 8_BIT_UNSIGNEDAn unsigned 8-bit data type. The values supported can be from 0 to 255.
  • 8_BIT_SIGNEDA signed 8-bit data type. The values supported can be from -128 to 127.
  • 16_BIT_UNSIGNEDA 16-bit unsigned data type. The values can range from 0 to 65,535.
  • 16_BIT_SIGNEDA 16-bit signed data type. The values can range from -32,768 to 32,767.
  • 32_BIT_UNSIGNEDA 32-bit unsigned data type. The values can range from 0 to 4,294,967,295.
  • 32_BIT_SIGNEDA 32-bit signed data type. The values can range from -2,147,483,648 to 2,147,483,647.
  • 32_BIT_FLOATA 32-bit data type supporting decimals.
  • 64_BITA 64-bit data type supporting decimals.
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.

  • NONEColor balancing will not be performed in the mosaic procedure. This is the default.
  • ColorBalancingColor balancing will be performed in the mosaic procedure.
Boolean
MatchingMethod
(Optional)

Choose the color matching method to apply to the rasters.

  • NONEThis option will not use the color matching operation when mosaicking your raster datasets.
  • STATISTICS_MATCHINGThis method will match the statistical differences (minimum, maximum, and mean) between the reference overlap area and the source overlap area; the transformation will then be applied to the entire target dataset.
  • HISTOGRAM_MATCHINGThis method will match the histogram from the reference overlap area with the source overlap area; the transformation will then be applied to the entire target.
  • LINEARCORRELATION_MATCHINGThis method will match overlapped pixels and interpolate to the rest of the source; pixels that do not have a one-to-one relationship will use a weighted average.
String
ReferenceRaster
(Optional)

If color matching is applied, choose how to specify the reference raster.

  • CALCULATE_FROM_ALLThe system will calculate the best raster dataset to use, based on all the raster catalog items.
  • SPECIFY_OIDThe user will type in the Object ID (OID) of the raster catalog item to use as the reference raster.
  • DEFINE_FROM_SELECTIONThe system will calculate the best raster dataset to use, based on the raster catalog items that are selected.
LegacyLegacy:

Older scripts and models may still use the old keyword. With the ArcGIS 10.1 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

RasterCatalogToRasterDataset example 1 (Python window)

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", "")
RasterCatalogToRasterDataset example 2 (stand-alone script)

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()

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/18/2013