Batch Zonal Statistics as table?

المشرف العام

Administrator
طاقم الإدارة
I want to calculate zonal statistics as table for multiple rasters, but can't figure out how. My code runs, but there is no output. What I am trying is:

import arcpy, osarcpy.env.workspace=r'F:\Sheyenne\Atmospherically Corrected Landsat\Indices\Main\NDWI\main_master'#zones to calculate stats oninpoly=r'F:\Sheyenne\SNG_sections.shp'#where to save output filesdestination_path=r'F:\Sheyenne\Atmospherically Corrected Landsat\Indices\Main\NDWI\zonal_stats' #list of rasters to calculate statistics onrasters = arcpy.ListRasters("*water_.tif*")#start loopfor raster in rasters: destination_path = os.path.join(destination_path, raster + ".dbf") arcpy.gp.ZonalStatisticsAsTable_sa(inpoly, "OBJECTID",raster, destination_path,"DATA","ALL")

أكثر...
 
أعلى