【ArcGIS遇上Python】ArcGIS Python实现Modis NDVI批量求年最大值
生活随笔
收集整理的這篇文章主要介紹了
【ArcGIS遇上Python】ArcGIS Python实现Modis NDVI批量求年最大值
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一年中的12個月份的月最大合成(mvc)數據放在“F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\",數據名稱格式為mvc_198801,mvc_198802........mvc_198812。處理年份為1981-2006,代碼為:
import arcpy arcpy.CheckOutExtension("spatial") str="F:\\Vegetation Change\\Data\\GIMMS Data\\1MVC\\"+"mvc_" for i in range(1981,2007):a1 = +str(i)+"01"a2 = str+str(i)+"02"a3 = str+str(i)+"03"a4 = str+str(i)+"04"a5 = str+str(i)+"05"a6 = str+str(i)+"06"a7 = str+str(i)+"07"a8 = str+str(i)+"08"a9 = str+str(i)+"09"a10 = str+str(i)+"10"a11 = str+str(i)+"11"a12 = str+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") print("All done,please close!")?
?
?
?
?
總結
以上是生活随笔為你收集整理的【ArcGIS遇上Python】ArcGIS Python实现Modis NDVI批量求年最大值的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【ArcGIS遇上Python】Pyth
- 下一篇: 【ArcGIS遇上Python】栅格影像