# encoding: utf-8
import arcpy
from arcpy import env
from arcpy.sa import *
arcpy.CheckOutExtension("spatial")
arcpy.env.workspace = r"D:\MOD\MOD17replace\2001_2020month_average\31" #输入文件位置
output_path = "D:/MOD/MOD17replace/2001_2020month_average/result/" #输出文件位置
rasterlist = arcpy.ListRasters("*","tif") #读取所有tif文件
for raster in rasterlist:
out = output_path + raster
out_raster = (RoundUp(raster))/310.0#需要除的数
out_raster.save(out)
print ('......' + raster + '......')
使用arcpy求栅格平均值
最新推荐文章于 2023-09-19 09:30:25 发布