slburns

reclass multiple files

Discussion created by slburns on Jun 13, 2011
Latest reply on Jun 15, 2011 by slburns
Hi All,
I would like to reclassify many rasters with the same classifications but I am receiving an error
Runtime error <type 'exceptions.RuntimeError'>: Object: Error in executing tool

not sure where I am going wrong
Thanks

import arcpy
from arcpy import env
from arcpy.sa import *
arcpy.CheckOutExtension("Spatial")

env.workspace = "D:/reclass/reclassinputs"
output_workspace="D:/reclass/reclassoutputs"
reclassfield = "Value"
remap=RemapValue([[0,11,1],
                  [12,24,2], 
                  [25,49,3],
                  [50,74,4],
                  [75,99,5],
                  [100,350,6]])
rasterlist = []
for rasters in arcpy.ListRasters():
    rasterlist.append(rasters)
    outReclassify=Reclassify(rasterlist, reclassfield, remap, "NODATA")
outReclassify.save(output_workspace)
print "done"

Outcomes