Summary
Creates an empty raster catalog in a geodatabase.
Usage
Once the raster catalog is created, raster datasets can be loaded into it.
Raster catalogs can be created in any type of geodatabase.
Once a raster catalog is created, raster datasets can be loaded into it by right-clicking the raster catalog and selecting Load Data. Raster datasets can also be loaded into a raster catalog using the Workspace To Raster Catalog tool.
Raster catalogs can be managed or unmanaged by the geodatabase. When the raster catalog is managed by the geodatabase, the raster datasets in the raster catalog will be physically stored in the geodatabase. When a row or raster is deleted from the catalog, it is deleted from the geodatabase. When the raster catalog is unmanaged, the raster catalog only contains links or pointers connecting a raster catalog row to a raster dataset stored outside the geodatabase. These raster datasets are stored outside the geodatabase. All raster datasets loaded into an unmanaged raster catalog must be a file on disk. Geodatabase raster datasets can only be loaded into raster catalogs that are managed. Raster catalogs stored in an enterprise geodatabase are always managed.
It is recommended that you use the Workspace To Raster Catalog tool to load data into the raster catalog so that the spatial grid size will be automatically calculated.
Learn more about geodatabase items—Spatial indexes and grid size
When creating a raster catalog in an enterprise geodatabase, the raster dataset name cannot have spaces. Use underscores to separate words in raster dataset names.
Syntax
CreateRasterCatalog_management (out_path, out_name, {raster_spatial_reference}, {spatial_reference}, {config_keyword}, {spatial_grid_1}, {spatial_grid_2}, {spatial_grid_3}, {raster_management_type}, {template_raster_catalog})
Parameter | Explanation | Data Type |
out_path | The geodatabase to contain the raster catalog; this can be any type of geodatabase. | Workspace |
out_name | The name of the raster catalog to be created. | String |
raster_spatial_reference (Optional) | The coordinate system for the raster column in the raster catalog. The spatial reference of the raster column is used during data loading as one of the following:
The default value is the coordinate system set in the geoprocessing Environments. | Coordinate System |
spatial_reference (Optional) | The coordinate system for the geometry column. The spatial reference for the geometry column defines the spatial reference of the footprints of the raster datasets. The default value is the coordinate system set in the geoprocessing Environments. | Spatial Reference |
config_keyword (Optional) | Specifies the storage parameters (configuration) for a geodatabase. Configuration keywords are set up by your database administrator. | String |
spatial_grid_1 (Optional) | The spatial_grid_1, spatial_grid_2, and spatial_grid_3 parameters are used to compute a spatial index and only apply to file geodatabases and enterprise geodatabases. If you are unfamiliar with setting grid sizes, leave these options as 0,0,0 and ArcGIS will compute optimal sizes for you. If you use the default spatial grid index (of zero), it is recommended that you load data using the Workspace To Raster Catalog tool. If that tool is used to load raster datasets, the spatial grid size will be automatically calculated. If another tool is used to load raster datasets into a raster catalog, the Calculate Default Spatial Grid Index tool needs to be used after the loading is completed. For more information about this parameter, refer to the Add Spatial Index tool documentation. | Double |
spatial_grid_2 (Optional) | Cell size of the second spatial grid. Leave the size at 0 if you only want one grid. Otherwise, set the size to at least three times larger than Spatial Grid 1. | Double |
spatial_grid_3 (Optional) | Cell size of the third spatial grid. Leave the size at 0 if you only want two grids. Otherwise, set the size to at least three times larger than Spatial Grid 2. | Double |
raster_management_type (Optional) | Raster datasets in raster catalogs can be managed in two ways: managed or unmanaged (by the geodatabase).
| String |
template_raster_catalog [template_raster_catalog,...] (Optional) | If you want to base your new raster catalog on a template, you can specify a template raster catalog. The new raster catalog will then have the same fields as the template raster catalog. | Raster Catalog Layer |
Code sample
CreateRasterCatalog example 1 (Python window)
This is a Python sample for the CreateRasterCatalog tool.
import arcpy
arcpy.CreateRasterCatalog_management("c:/data/CreateRC.gdb", "fgdb_unman",
"Albers_Conical.prj", "Albers_Conical.prj",
"MAX_FILE_SIZE_4GB", "1000", "3000", "9000",
"UNMANAGED", "")
CreateRasterCatalog example 2 (stand-alone script)
This is a Python script sample for the CreateRasterCatalog tool.
##========================
##Create Raster Catalog
##Usage: CreateRasterCatalog_management out_path out_name {raster_spatial_reference} {spatial_reference} {config_keyword}
## {spatial_grid_1} {spatial_grid_2} {spatial_grid_3} {MANAGED | UNMANAGED}
## {template_raster_catalog;template_raster_catalog...}
try:
import arcpy
arcpy.env.workspace = r"C:\PrjWorkspace"
##Create PGDB Unmanaged Raster Catalog
arcpy.CreateRasterCatalog_management("CreateRC.mdb", "Unmanaged", "Albers_Conical.prj", "Albers_Conical.prj", "", "12000", "", "", \
"UNMANAGED", "")
##Create FGDB Unmanaged Raster Catalog
arcpy.CreateRasterCatalog_management("CreateRC.gdb", "Unmanaged", "Albers_Conical.prj", "Albers_Conical.prj", "MAX_FILE_SIZE_4GB", \
"1000", "3000", "9000", "UNMANAGED", "")
##Create Managed Enterprise Raster Catalog with FGDB template
arcpy.CreateRasterCatalog_management("SDE94.sde", "Managed", "Albers_Conical.prj", "Albers_Conical.prj", "DEFAULTS","2000", "6000", \
"18000", "MANAGED", "CreateRC.mdb\\Unmanaged;CreateRC.gdb\\Unmanaged")
except:
print "Create Raster Catalog example failed."
print arcpy.GetMessages()
Environments
Licensing information
- ArcGIS Desktop Basic: Yes
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes