Workspace To Raster Catalog (Data Management)

License Level:BasicStandardAdvanced

Summary

Loads all the raster datasets stored in the same workspace into an existing raster catalog.

Usage

Syntax

WorkspaceToRasterCatalog_management (in_workspace, in_raster_catalog, {include_subdirectories}, {project})
ParameterExplanationData 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.

  • NONEDoes not include subdirectories. This is the default.
  • INCLUDE_SUBDIRECTORIESIncludes all the raster datasets within the subdirectories when loading.
Boolean
project
(Optional)

Specify whether to project the raster datasets projected on the fly.

  • NONEAll raster datasets are loaded into the raster catalog with the original spatial reference of the raster dataset. This is the default.
  • PROJECT_ONFLYAll raster datasets will be projected on the fly (to the coordinate system specified in the raster column) when loaded into the raster catalog.
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}
try:
    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")
except:
    print "Workspace To Raster Catalog 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
5/7/2015