env.workspace = "C:\Users\\Documents\pythonMODIS\extract" # Set local variables inZoneData = "mask.shp" zoneField = "Classes" inValueRaster = "mi1511171_clip.tif" outTable = "zonalstattblout02.dbf" # Execute ZonalStatisticsAsTable outZSaT = ZonalStatisticsAsTable(inZoneData, zoneField, inValueRaster, outTable, "NODATA", "MEAN")
I have several modis images and one layer mask for 3 regional field classes. I want to iterate zonal statistics in all rasters data set, get a summary dbf table but keeping each raster name, mean, min, max by region class.
I had run once for each image but I want to iterate all the images together. I wonder if I need to define a rasterlist in the workspace and to include that in outZsat
I need some help with the code.