Using ArcGIS 10.3 I'm receiving the dreaded 'ERROR 999999' when attempting to project a geodatabase full of rasters from WGS84_UTM_zone_10N to Nad83_BC_Environment_Albers
import arcpy
InRasterGDB = r"C:\Users\PoirierM\Documents\GISData\LandsatSSTImagery.gdb"
OutRasterGDB = r"C:\Users\PoirierM\Documents\GISData\LandsatSSTImageryAlbers.gdb"
OutCoordSystem = "3005"
ResampleType = "BILINEAR"
CellSize = "30 30"
GeoTransform = "WGS_1984_(ITRF00)_To_NAD_1983"
InCoordSystem = "32610"
arcpy.env.workspace = InRasterGDB
for fname in arcpy.ListRasters():
print fname
print OutRasterGDB + "\\" + fname
arcpy.ProjectRaster_management(InRasterGDB + "\\" + fname, OutRasterGDB + "\\" + fname, OutCoordSystem, ResampleType, CellSize, GeoTransform, "", InCoordSystem)
This should work, but it returns the following error when run in the Python Window in ArcCatalog:
Runtime error
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 9009, in ProjectRaster
raise e ExecuteError: ERROR 999999: Error executing function. Failed to execute (ProjectRaster).
I can do a single raster manually through either the tool interface or within modelbuilder. Can anyone suggest why it won't work as a Python script?
I've got a working script now - see my (MPoirier) answer below.