一年中的12个月份的月最大合成(mvc)数据放在“F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\",数据名称格式为mvc_198801,mvc_198802........mvc_198812。处理年份为1981-2006,代码为:
import arcpy arcpy.CheckOutExtension("spatial") for i in range(1981,2007): a1 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"01" a2 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"02" a3 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"03" a4 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"04" a5 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"05" a6 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"06" a7 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"07" a8 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"08" a9 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"09" a10 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"10" a11 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"11" a12 = "F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_"+str(i)+"12" out = "F:\\Vegetation Change\\Data\\GIMMS Data\\2Max\\max_"+str(i) arcpy.gp.CellStatistics_sa((a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12), out, "MAXIMUM", "DATA") print(str(i) +" has done")
ArcGIS Python实现Modis NDVI批量求年最大值
原文:http://blog.csdn.net/lucky51222/article/details/38930953