ericanewton

Reprojecting Rasters Issue

Discussion created by ericanewton on Aug 9, 2011
Latest reply on Aug 10, 2011 by ericanewton
Hi there,

I am new to python and attempting to set up a batch process to reproject rasters in a folder. 

This is the script and error message I am getting.  I defined the projection of the rasters in the folder to WGS 1984 UTM Zone 16N before starting.

>>> import arcpy
... arcpy.env.workspace = r"C:/GIS/NDVI/Georef_27_21_TIFFs/test"
... rasterList = arcpy.ListRasters("*", "All")
... for raster in rasterList:
...     print raster
... outraster = raster+"_ontlambproj"
... arcpy.ProjectRaster_management("raster", "outraster", "MNR_LAMBERT_PROJECTION_3161.prj", "NEAREST", "30", "WGS_1984_(ITRF00)_To_NAD_1983", "#", r"C:/Program Files/ArcGIS/Desktop10.0/Coordinate Systems/Projected Coordinate Systems/UTM/WGS 1984/Northern Hemisphere/WGS 1984 UTM Zone 16N.prj")
...
L5027021_02119850802_B30.TIF

LT5027021008516650_B3.tif

Runtime error <class 'arcgisscripting.ExecuteError'>: Undefined coordinate system for input dataset.

Can anyone help me determine why I am getting this error?

Thank you so much!

Erica

Outcomes