The maximum synthesis method (MVC) can be done in band math in Envi, B1>B2, but not batched; This article implements the Python code in bulk in ArcGIS, as follows:
The MODIS NDVI data used is the monthly data after splicing and projection in MRT, one months has two periods, the data format is. tif, the format of the file name is: 20040101.1_km_16_days_ndvi.tif,20040102.1_km_16_ Days_ndvi.tif represents the two-year data for January 2004. This treatment is for 2004-2013 years of data for 10 years.
The Python code is as follows:
Import Arcpyimport timearcpy. Checkoutextension ("spatial") time1=time.strftime ('%y-%m-%d-%h:%m:%s ') sname1= "f:\\modis_16\\1moasic\\" Sname2= ". 1 _km_16_days_ndvi.tif "out =" f:\\modis_16\\2mvc\\ddwwq "for I in range (2004,2014): for J in Range (1,13): if J>9: year= str (i) +str (j) + "0" else: year= str (i) + "0" +str (j) + "0" print sname1+year+ "1" +sname2 print sname1+year+ "2" +sname2 out= "f:\\modis_16\\2mvc\\" +year[0:6] print out + "are being ..." Arcpy.gp.CellStatistics_sa ((sname1+year+ "1" +sname2,sname1+year+ "2" +sname2), Out, "MAXIMUM", "DATA") Print out + "have done ..." " print"-------------------------------------------------------"print" <---- ------ALL is done!!! ----------> "Print" Start Time: "+time1print" End time : "+time.strftime ('%y-%m-%d-%h:%m:%s ')
Insight: The core part of this process is the patchwork of file name strings.
ArcGIS Python maximizes the monthly synthesis of MODIS ndvi