Summary
Loads all the raster datasets stored in the same workspace into an existing raster catalog.
Usage
All raster datasets within the specified workspace will be loaded into the raster catalog.
The raster catalog must already exist for this tool to run.
By default, the spatial reference and geotransformation of the raster datasets are persisted in the raster catalog. If you want to project the raster datasets to the spatial reference of the raster column in the raster catalog during loading, use the Project on-the-fly parameter.
When loading raster datasets into a raster catalog with this tool, the spatial grid index is automatically calculated upon completion of the tool.
Syntax
arcpy.management.WorkspaceToRasterCatalog(in_workspace, in_raster_catalog, {include_subdirectories}, {project})
Parameter | Explanation | Data Type |
in_workspace | The workspace that contains all the raster datasets to be loaded into the raster catalog. | Workspace |
in_raster_catalog | An existing raster catalog that will have all the raster datasets from the workspace loaded into it. | Raster Catalog |
include_subdirectories (Optional) | Specify whether to include subdirectories.
| Boolean |
project (Optional) | Specify whether to project the raster datasets projected on the fly.
| Boolean |
Code sample
WorkspaceToRasterCatalog example (Python window)
This is a Python sample for the WorkspaceToRaster Catalog tool.
import arcpy
arcpy.WorkspaceToRasterCatalog_management("c:/data", "c:/RC/WS2RC.gdb/emptyRC",
"INCLUDE_SUBDIRECTORIES",
"PROJECT_ONFLY")
WorkspaceToRasterCatalog example 2 (stand-alone script)
This is a Python script sample for the WorkspaceToRaster Catalog tool.
##======================
##Workspace To Raster Catalog
##Usage: WorkspaceToRasterCatalog_management in_workspace in_raster_catalog {NONE | INCLUDE_SUBDIRECTORIES} {NONE | PROJECT_ONFLY}
import arcpy
arcpy.env.workspace = r"C:\PrjWorkspace"
##Load Workspace to Unmanaged FGDB Raster Catalog
arcpy.WorkspaceToRasterCatalog_management("data", "WS2RC.gdb\\Unmanaged", "INCLUDE_SUBDIRECTORIES", "PROJECT_ONFLY")
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes