Create Raster Catalog (Data Management)
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: personal, file, or ArcSDE.
-
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, then the raster datasets inside the raster catalog will be physically stored within 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 ArcSDE geodatabase are always managed.
-
It is recommended that you use the Workspace To Raster Catalog tool to load data in 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 ArcSDE geodatabase, the raster dataset name cannot have spaces. Use underscores to separate words in raster dataset names.
Syntax
Parameter | Explanation | Data Type |
out_path |
The geodatabase to contain the raster catalog. This can be any type of geodatabase: personal, file, or ArcSDE. | 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
The default value is the coordinate system set in the environment settings. | 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 environment settings. | Spatial Reference |
config_keyword (Optional) |
Specifies the storage parameters (configuration) for a file geodatabase and an ArcSDE geodatabase. Personal geodatabases do not use configuration keywords. ArcSDE configuration keywords are set up by your database administrator. | String |
spatial_grid_1 (Optional) |
The Output Spatial Grid 1, 2, and 3 parameters are used to compute a spatial index and only apply to file geodatabases and ArcSDE 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 within raster catalogs can be managed in two ways: managed or unmanaged (by the geodatabase).
| String |
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
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", "")
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 SDE Managed 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
- Output Coordinate System
This environment, if set, is used for the parameters Coordinate System for the raster column and Coordinate System for the geometry column.