Scripting to Batch project raster issue

Discussion created by bob_says48 on Oct 3, 2013
Latest reply on Oct 15, 2013 by GSCUser85
Hi guys, I'm trying to write a script that will reproject my tiff files(450 of em). The script also includes a loop that will loops through my files in a folder.

Here's my code that i've already started off with and i'm not exactly sure where my problem is as I am still fairly new to it. Any pointers, suggestions and solution will be greatly appreciated! Thanks in advance!

import arcpy 


        arcpy.env.workspace = r"D:Project Scripting\A1-4"
            # Get a list of Tiffs in the workspace.
        rasters = arcpy.ListRasters("*", "TIF")
        for raster in rasters:
                print "Processing: " + raster

                outRaster = raster+"_reprojected"

                arcpy.ProjectRaster_management(raster, outRaster,\
                               "PSAD_1956_UTM_Zone_19S", "NEAREST", "",\
                               "Peru96_UTM_Zone_19S", "", "")

    print "Project Raster example failed."
    print arcpy.GetMessages()

When i ran the code it gave me the following response.....

Project Raster example failed.
ERROR 000622: Failed to execute (Project Raster). Parameters are not valid.
ERROR 000628: Cannot set input into parameter out_coor_system.