I need to retrieve minimum, maximum, mean, and standard deviation statistical values from a directory of raster files and store the values in an excel spreadsheet.
My approach as been cursors and GetRasterProperties_management.
Any insight would be greatly appreciated.
actually I was referring to the code that cycles through the rasters and uses the tools's arcpy code access to get the stats. Or do you not have that bit yet? since you refer to cursors
i really feel like there is a more efficient approach I just have no idea what it could be. I also thought there would already be an existing tool for this objective but my searches have come up empty handed.
I did something similar the other day. Instead of keeping it all inside GIS, I did a standalone script and exported from the script to a .txt file, which I then imported in Excel.
The iterating and printing part of the script looks like this:
# -*- coding: utf-8 -*-
import arcpy, os, sys, string, glob
arcpy.env.overwriteOutput = True
shpWS = "E:\MidlGIS\I7010"
arcpy.env.workspace = shpWS
shplist = arcpy.ListFeatureClasses()
for fc in shplist:
count = arcpy.GetCount_management(fc)
ord = fc
ord = ord[6:]
ord = ord[:-4]
print fc[1:5]+"____"+ ord +'____'+str(count)