Make Raster Catalog Layer (Data Management)
Summary
Creates a raster catalog layer from an input raster catalog. The layer that is created by the tool is temporary and will not persist after the session ends unless the layer is saved to disk or the map document is saved.
Usage
-
To make your layer permanent, right-click the layer in the ArcMap table of contents and click Save As Layer File, or use the Save To Layer File tool.
Syntax
Parameter | Explanation | Data Type |
in_raster_catalog |
The raster catalog containing one or more raster catalog items (raster datasets). | Raster Catalog Layer |
layer_name |
Name of the temporary raster catalog layer. | Raster Catalog Layer |
where_clause (Optional) |
An SQL expression used to select a subset of raster catalog items. The syntax for the expression differs slightly depending on the data source. For example, if you're querying file or ArcSDE geodatabases, enclose field names in double quotes: "MY_FIELD" If you're querying personal geodatabases, enclose fields in square brackets: [MY_FIELD]. | SQL Expression |
workspace (Optional) |
The input workspace used to validate the field names. If the input is from a file or personal geodatabase and the output workspace is an ArcSDE geodatabase, the field names may be truncated, since some database fields can only have names with ten characters or less. The new names may be reviewed and altered using the Field Info parameter. | Workspace |
field_info (Optional) |
Specifies which fields from the input table to rename and make visible in the output table view. | Field Info |
Code Sample
This is a Python sample for MakeRasterCatalogLayer.
import arcpy
arcpy.MakeRasterCatalogLayer_management("c:/data/fgdb.gdb/catalog", "catlayer",\
"OBJECTID<3", "SDE94.sde", "#")
This is a Python script sample for MakeRasterCatalogLayer.
##====================================
##Make Raster Catalog Layer
##Usage: MakeRasterCatalogLayer_management in_raster_catalog layer_name {where_clause}
## {workspace} {field_info}
try:
import arcpy
arcpy.env.workspace = r"C:/Workspace"
##Create raster catalog layer from unmanaged raster catalog
##Use SDE workspace to validate the field
arcpy.MakeRasterCatalogLayer_management("fgdb.gdb/catalog", "catlayer", "OBJECTID<3",\
"SDE94.sde", "#")
print arcpy.GetMessages()
except:
print "Make Raster Catalog Layer example failed."
print arcpy.GetMessages()