# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # zonal.py # Created on: 2017-10-27 16:40:16.00000 # (generated by ArcGIS/ModelBuilder) # Description: # --------------------------------------------------------------------------- # Import arcpy module import arcpy # Local variables: arcpy.env.workspace="F:\\a\\a1982\\csv\\GIMMS_3g\\" rasters = arcpy.ListRasters("*", "tif") site_buffer_shp = "F:\\a\\a1982\\csv\\shp\\site_buffer.shp" for raster in rasters: print(raster) out="F:\\a\\a1982\\csv\\table\\"+raster arcpy.gp.ZonalStatisticsAsTable_sa(site_buffer_shp, "file_name", raster, out, "DATA", "ALL") print(out+" OK !!!") print("All done") |
|
来自: 昵称27943849 > 《arcgis》