AnsweredAssumed Answered

strange value.. of zonal statistic. by arcpy (arcgis 10)

Question asked by ljs5219 on May 14, 2013
Latest reply on May 14, 2013 by arekmatoszka
I want to proceed zonal at the one time.
so i completed!
BUT!! result,, value is SAME! T.T......
how can i do it?



# Import arcpy module
import arcpy, os
from arcpy import env
from arcpy.sa import *

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")

# Input data source
arcpy.env.workspace = "C:/py/07"
arcpy.env.scratchWorkspace = "C:/py/07"
arcpy.env.overwriteOutput = True

ZoneData = "C:/py/FISHNET_4k_FeatureToPolygon.shp"

# Output File
OutputFolder = "C:/py/zonal"

# Loop through a list of files in the workspace
RasterFiles = arcpy.ListRasters()
print RasterFiles
print " "

# Local variables:
for filename in RasterFiles:
    print "Processing: {0}".format(filename)
    input_dir = arcpy.env.workspace
    inRaster1 = "C:/py/07/lai_0907_m"
    inRaster1 = "C:/py/07/lai_0908_m"
    inRaster1 = "C:/py/07/lai_0909_m"
    inRaster1 = "C:/py/07/lai_0910_m"   
    outRaster1 = os.path.join(OutputFolder,"z4_" + filename)


    # Process: Zonal Statistics
    saveRaster = arcpy.sa.ZonalStatistics(ZoneData, "ID", inRaster1, "MEAN", "DATA")
    saveRaster.save(outRaster1)

print " "
print ":o) End Processing :)"
print arcpy.GetMessages()

Outcomes