-
Notifications
You must be signed in to change notification settings - Fork 0
/
mvc.py
32 lines (26 loc) · 865 Bytes
/
mvc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#*****************************************************************
# Filename : mvc.py
# Author : Dong Yu
# E-mail : [email protected]
# Date : 20180506
# Description : MVC(Maximum Value Composite) method
# Version : 0.1
# Build : 1
# 2018 Dong Yu
#*****************************************************************
import arcpy
if __name__ == "__main__":
arcpy.CheckOutExtension("Spatial")
# target spatial reference
arcpy.env.workspace = ".\\"
outfilename = ".\\evimax2017.tif"
rasterlist = arcpy.ListRasters()
# print rasterlist
filenames = []
for fc in rasterlist:
# print fc
filename = ".\\" + fc
filenames.append(filename)
print filenames
arcpy.gp.CellStatistics_sa(filenames, outfilename, "MAXIMUM", "DATA")
print("All done,please close!")