[GIS] How to set coordinate system on raster catalog with arcpy

arcgis-10.0arcgis-desktoparcpyraster-catalog

When creating a raster catalog, if the optional coordinate system fields for the raster and geometry columns are left empty, they will be stored as unknown. What geoprocessing functions in arcpy should I use to set both of them?

enter image description here

enter image description here

Best Answer

One would think that Project Raster should be used, but it doesn't work with unknown projections. It's intended to change between projections.

What you are looking for is Define Projection. It's designed to work on datasets that don't have a projection.

The only use for this tool is for datsets that have an unknown or incorrect coordinate system defined. This tool only updates the existing coordinate system information—it does not modify any geometry. If you want to transform the geometry to another coordinate system, use the Project tool.

So, for arcpy, it would be:

arcpy.DefineProjection_management("<path to image>", "<EPSG code>")

Edit:

I'm not sure if there is a programmatical way to define the Raster Coordinate system. I searched and all I found was this, which outlines how to define/modify a raster's coordinate system.

Related Question