Esempio n. 1
0
#cru_2

# Import COM Dispatch module 	 
from win32com.client import Dispatch 	 
# Create the geoprocessor object 	 
GP = Dispatch("esriGeoprocessing.GPDispatch.1") 	 
# Set the workspace
ws = 'f:/dev/cru_precip/'
GP.Workspace = ws
count = 0

fcs = GP.ListRasters() 	 
# Create the multi-value string for the Analysis Union tool 	 
fcs.reset 	 
# Get the first feature class name and set the string variable 	 
fc = fcs.next() 	 
inputs = ws + fc 	 
# Get the next name and start the loop 	 
fc = fcs.next() 	 
while fc: # While the fc name is not empty	 
    inputs = inputs + ";" + ws + fc	 
    fc = fcs.next()
    count = count + 1
    
try:
    print 'Processing MEAN combine on %s\n' % ws
    GP.CheckOutExtension("Spatial")
    outRaster = "f:/dev/cru_tmp/f_00s"
    # 60s: f:/dev/cru_precip/prn_1961_apr;f:/dev/cru_precip/prn_1961_aug;f:/dev/cru_precip/prn_1961_dec;f:/dev/cru_precip/prn_1961_feb;f:/dev/cru_precip/prn_1961_jan;f:/dev/cru_precip/prn_1961_jul;f:/dev/cru_precip/prn_1961_jun;f:/dev/cru_precip/prn_1961_mar;f:/dev/cru_precip/prn_1961_may;f:/dev/cru_precip/prn_1961_nov;f:/dev/cru_precip/prn_1961_oct;f:/dev/cru_precip/prn_1961_sep;f:/dev/cru_precip/prn_1962_apr;f:/dev/cru_precip/prn_1962_aug;f:/dev/cru_precip/prn_1962_dec;f:/dev/cru_precip/prn_1962_feb;f:/dev/cru_precip/prn_1962_jan;f:/dev/cru_precip/prn_1962_jul;f:/dev/cru_precip/prn_1962_jun;f:/dev/cru_precip/prn_1962_mar;f:/dev/cru_precip/prn_1962_may;f:/dev/cru_precip/prn_1962_nov;f:/dev/cru_precip/prn_1962_oct;f:/dev/cru_precip/prn_1962_sep;f:/dev/cru_precip/prn_1963_apr;f:/dev/cru_precip/prn_1963_aug;f:/dev/cru_precip/prn_1963_dec;f:/dev/cru_precip/prn_1963_feb;f:/dev/cru_precip/prn_1963_jan;f:/dev/cru_precip/prn_1963_jul;f:/dev/cru_precip/prn_1963_jun;f:/dev/cru_precip/prn_1963_mar;f:/dev/cru_precip/prn_1963_may;f:/dev/cru_precip/prn_1963_nov;f:/dev/cru_precip/prn_1963_oct;f:/dev/cru_precip/prn_1963_sep;f:/dev/cru_precip/prn_1964_apr;f:/dev/cru_precip/prn_1964_aug;f:/dev/cru_precip/prn_1964_dec;f:/dev/cru_precip/prn_1964_feb;f:/dev/cru_precip/prn_1964_jan;f:/dev/cru_precip/prn_1964_jul;f:/dev/cru_precip/prn_1964_jun;f:/dev/cru_precip/prn_1964_mar;f:/dev/cru_precip/prn_1964_may;f:/dev/cru_precip/prn_1964_nov;f:/dev/cru_precip/prn_1964_oct;f:/dev/cru_precip/prn_1964_sep;f:/dev/cru_precip/prn_1965_apr;f:/dev/cru_precip/prn_1965_aug;f:/dev/cru_precip/prn_1965_dec;f:/dev/cru_precip/prn_1965_feb;f:/dev/cru_precip/prn_1965_jan;f:/dev/cru_precip/prn_1965_jul;f:/dev/cru_precip/prn_1965_jun;f:/dev/cru_precip/prn_1965_mar;f:/dev/cru_precip/prn_1965_may;f:/dev/cru_precip/prn_1965_nov;f:/dev/cru_precip/prn_1965_oct;f:/dev/cru_precip/prn_1965_sep;f:/dev/cru_precip/prn_1966_apr;f:/dev/cru_precip/prn_1966_aug;f:/dev/cru_precip/prn_1966_dec;f:/dev/cru_precip/prn_1966_feb;f:/dev/cru_precip/prn_1966_jan;f:/dev/cru_precip/prn_1966_jul;f:/dev/cru_precip/prn_1966_jun;f:/dev/cru_precip/prn_1966_mar;f:/dev/cru_precip/prn_1966_may;f:/dev/cru_precip/prn_1966_nov;f:/dev/cru_precip/prn_1966_oct;f:/dev/cru_precip/prn_1966_sep;f:/dev/cru_precip/prn_1967_apr;f:/dev/cru_precip/prn_1967_aug;f:/dev/cru_precip/prn_1967_dec;f:/dev/cru_precip/prn_1967_feb;f:/dev/cru_precip/prn_1967_jan;f:/dev/cru_precip/prn_1967_jul;f:/dev/cru_precip/prn_1967_jun;f:/dev/cru_precip/prn_1967_mar;f:/dev/cru_precip/prn_1967_may;f:/dev/cru_precip/prn_1967_nov;f:/dev/cru_precip/prn_1967_oct;f:/dev/cru_precip/prn_1967_sep;f:/dev/cru_precip/prn_1968_apr;f:/dev/cru_precip/prn_1968_aug;f:/dev/cru_precip/prn_1968_dec;f:/dev/cru_precip/prn_1968_feb;f:/dev/cru_precip/prn_1968_jan;f:/dev/cru_precip/prn_1968_jul;f:/dev/cru_precip/prn_1968_jun;f:/dev/cru_precip/prn_1968_mar;f:/dev/cru_precip/prn_1968_may;f:/dev/cru_precip/prn_1968_nov;f:/dev/cru_precip/prn_1968_oct;f:/dev/cru_precip/prn_1968_sep;f:/dev/cru_precip/prn_1969_apr;f:/dev/cru_precip/prn_1969_aug;f:/dev/cru_precip/prn_1969_dec;f:/dev/cru_precip/prn_1969_feb;f:/dev/cru_precip/prn_1969_jan;f:/dev/cru_precip/prn_1969_jul;f:/dev/cru_precip/prn_1969_jun;f:/dev/cru_precip/prn_1969_mar;f:/dev/cru_precip/prn_1969_may;f:/dev/cru_precip/prn_1969_nov;f:/dev/cru_precip/prn_1969_oct;f:/dev/cru_precip/prn_1969_sep
    # 70s: "f:/dev/cru_precip/prn_1970_apr;f:/dev/cru_precip/prn_1970_aug;f:/dev/cru_precip/prn_1970_dec;f:/dev/cru_precip/prn_1970_feb;f:/dev/cru_precip/prn_1970_jan;f:/dev/cru_precip/prn_1970_jul;f:/dev/cru_precip/prn_1970_jun;f:/dev/cru_precip/prn_1970_mar;f:/dev/cru_precip/prn_1970_may;f:/dev/cru_precip/prn_1970_nov;f:/dev/cru_precip/prn_1970_oct;f:/dev/cru_precip/prn_1970_sep;f:/dev/cru_precip/prn_1971_apr;f:/dev/cru_precip/prn_1971_aug;f:/dev/cru_precip/prn_1971_dec;f:/dev/cru_precip/prn_1971_feb;f:/dev/cru_precip/prn_1971_jan;f:/dev/cru_precip/prn_1971_jul;f:/dev/cru_precip/prn_1971_jun;f:/dev/cru_precip/prn_1971_mar;f:/dev/cru_precip/prn_1971_may;f:/dev/cru_precip/prn_1971_nov;f:/dev/cru_precip/prn_1971_oct;f:/dev/cru_precip/prn_1971_sep;f:/dev/cru_precip/prn_1972_apr;f:/dev/cru_precip/prn_1972_aug;f:/dev/cru_precip/prn_1972_dec;f:/dev/cru_precip/prn_1972_feb;f:/dev/cru_precip/prn_1972_jan;f:/dev/cru_precip/prn_1972_jul;f:/dev/cru_precip/prn_1972_jun;f:/dev/cru_precip/prn_1972_mar;f:/dev/cru_precip/prn_1972_may;f:/dev/cru_precip/prn_1972_nov;f:/dev/cru_precip/prn_1972_oct;f:/dev/cru_precip/prn_1972_sep;f:/dev/cru_precip/prn_1973_apr;f:/dev/cru_precip/prn_1973_aug;f:/dev/cru_precip/prn_1973_dec;f:/dev/cru_precip/prn_1973_feb;f:/dev/cru_precip/prn_1973_jan;f:/dev/cru_precip/prn_1973_jul;f:/dev/cru_precip/prn_1973_jun;f:/dev/cru_precip/prn_1973_mar;f:/dev/cru_precip/prn_1973_may;f:/dev/cru_precip/prn_1973_nov;f:/dev/cru_precip/prn_1973_oct;f:/dev/cru_precip/prn_1973_sep;f:/dev/cru_precip/prn_1974_apr;f:/dev/cru_precip/prn_1974_aug;f:/dev/cru_precip/prn_1974_dec;f:/dev/cru_precip/prn_1974_feb;f:/dev/cru_precip/prn_1974_jan;f:/dev/cru_precip/prn_1974_jul;f:/dev/cru_precip/prn_1974_jun;f:/dev/cru_precip/prn_1974_mar;f:/dev/cru_precip/prn_1974_may;f:/dev/cru_precip/prn_1974_nov;f:/dev/cru_precip/prn_1974_oct;f:/dev/cru_precip/prn_1974_sep;f:/dev/cru_precip/prn_1975_apr;f:/dev/cru_precip/prn_1975_aug;f:/dev/cru_precip/prn_1975_dec;f:/dev/cru_precip/prn_1975_feb;f:/dev/cru_precip/prn_1975_jan;f:/dev/cru_precip/prn_1975_jul;f:/dev/cru_precip/prn_1975_jun;f:/dev/cru_precip/prn_1975_mar;f:/dev/cru_precip/prn_1975_may;f:/dev/cru_precip/prn_1975_nov;f:/dev/cru_precip/prn_1975_oct;f:/dev/cru_precip/prn_1975_sep;f:/dev/cru_precip/prn_1976_apr;f:/dev/cru_precip/prn_1976_aug;f:/dev/cru_precip/prn_1976_dec;f:/dev/cru_precip/prn_1976_feb;f:/dev/cru_precip/prn_1976_jan;f:/dev/cru_precip/prn_1976_jul;f:/dev/cru_precip/prn_1976_jun;f:/dev/cru_precip/prn_1976_mar;f:/dev/cru_precip/prn_1976_may;f:/dev/cru_precip/prn_1976_nov;f:/dev/cru_precip/prn_1976_oct;f:/dev/cru_precip/prn_1976_sep;f:/dev/cru_precip/prn_1977_apr;f:/dev/cru_precip/prn_1977_aug;f:/dev/cru_precip/prn_1977_dec;f:/dev/cru_precip/prn_1977_feb;f:/dev/cru_precip/prn_1977_jan;f:/dev/cru_precip/prn_1977_jul;f:/dev/cru_precip/prn_1977_jun;f:/dev/cru_precip/prn_1977_mar;f:/dev/cru_precip/prn_1977_may;f:/dev/cru_precip/prn_1977_nov;f:/dev/cru_precip/prn_1977_oct;f:/dev/cru_precip/prn_1977_sep;f:/dev/cru_precip/prn_1978_apr;f:/dev/cru_precip/prn_1978_aug;f:/dev/cru_precip/prn_1978_dec;f:/dev/cru_precip/prn_1978_feb;f:/dev/cru_precip/prn_1978_jan;f:/dev/cru_precip/prn_1978_jul;f:/dev/cru_precip/prn_1978_jun;f:/dev/cru_precip/prn_1978_mar;f:/dev/cru_precip/prn_1978_may;f:/dev/cru_precip/prn_1978_nov;f:/dev/cru_precip/prn_1978_oct;f:/dev/cru_precip/prn_1978_sep;f:/dev/cru_precip/prn_1979_apr;f:/dev/cru_precip/prn_1979_aug;f:/dev/cru_precip/prn_1979_dec;f:/dev/cru_precip/prn_1979_feb;f:/dev/cru_precip/prn_1979_jan;f:/dev/cru_precip/prn_1979_jul;f:/dev/cru_precip/prn_1979_jun;f:/dev/cru_precip/prn_1979_mar;f:/dev/cru_precip/prn_1979_may;f:/dev/cru_precip/prn_1979_nov;f:/dev/cru_precip/prn_1979_oct;f:/dev/cru_precip/prn_1979_sep"
    # 80s: "f:/dev/cru_precip/prn_1980_apr;f:/dev/cru_precip/prn_1980_aug;f:/dev/cru_precip/prn_1980_dec;f:/dev/cru_precip/prn_1980_feb;f:/dev/cru_precip/prn_1980_jan;f:/dev/cru_precip/prn_1980_jul;f:/dev/cru_precip/prn_1980_jun;f:/dev/cru_precip/prn_1980_mar;f:/dev/cru_precip/prn_1980_may;f:/dev/cru_precip/prn_1980_nov;f:/dev/cru_precip/prn_1980_oct;f:/dev/cru_precip/prn_1980_sep;f:/dev/cru_precip/prn_1981_apr;f:/dev/cru_precip/prn_1981_aug;f:/dev/cru_precip/prn_1981_dec;f:/dev/cru_precip/prn_1981_feb;f:/dev/cru_precip/prn_1981_jan;f:/dev/cru_precip/prn_1981_jul;f:/dev/cru_precip/prn_1981_jun;f:/dev/cru_precip/prn_1981_mar;f:/dev/cru_precip/prn_1981_may;f:/dev/cru_precip/prn_1981_nov;f:/dev/cru_precip/prn_1981_oct;f:/dev/cru_precip/prn_1981_sep;f:/dev/cru_precip/prn_1982_apr;f:/dev/cru_precip/prn_1982_aug;f:/dev/cru_precip/prn_1982_dec;f:/dev/cru_precip/prn_1982_feb;f:/dev/cru_precip/prn_1982_jan;f:/dev/cru_precip/prn_1982_jul;f:/dev/cru_precip/prn_1982_jun;f:/dev/cru_precip/prn_1982_mar;f:/dev/cru_precip/prn_1982_may;f:/dev/cru_precip/prn_1982_nov;f:/dev/cru_precip/prn_1982_oct;f:/dev/cru_precip/prn_1982_sep;f:/dev/cru_precip/prn_1983_apr;f:/dev/cru_precip/prn_1983_aug;f:/dev/cru_precip/prn_1983_dec;f:/dev/cru_precip/prn_1983_feb;f:/dev/cru_precip/prn_1983_jan;f:/dev/cru_precip/prn_1983_jul;f:/dev/cru_precip/prn_1983_jun;f:/dev/cru_precip/prn_1983_mar;f:/dev/cru_precip/prn_1983_may;f:/dev/cru_precip/prn_1983_nov;f:/dev/cru_precip/prn_1983_oct;f:/dev/cru_precip/prn_1983_sep;f:/dev/cru_precip/prn_1984_apr;f:/dev/cru_precip/prn_1984_aug;f:/dev/cru_precip/prn_1984_dec;f:/dev/cru_precip/prn_1984_feb;f:/dev/cru_precip/prn_1984_jan;f:/dev/cru_precip/prn_1984_jul;f:/dev/cru_precip/prn_1984_jun;f:/dev/cru_precip/prn_1984_mar;f:/dev/cru_precip/prn_1984_may;f:/dev/cru_precip/prn_1984_nov;f:/dev/cru_precip/prn_1984_oct;f:/dev/cru_precip/prn_1984_sep;f:/dev/cru_precip/prn_1985_apr;f:/dev/cru_precip/prn_1985_aug;f:/dev/cru_precip/prn_1985_dec;f:/dev/cru_precip/prn_1985_feb;f:/dev/cru_precip/prn_1985_jan;f:/dev/cru_precip/prn_1985_jul;f:/dev/cru_precip/prn_1985_jun;f:/dev/cru_precip/prn_1985_mar;f:/dev/cru_precip/prn_1985_may;f:/dev/cru_precip/prn_1985_nov;f:/dev/cru_precip/prn_1985_oct;f:/dev/cru_precip/prn_1985_sep;f:/dev/cru_precip/prn_1986_apr;f:/dev/cru_precip/prn_1986_aug;f:/dev/cru_precip/prn_1986_dec;f:/dev/cru_precip/prn_1986_feb;f:/dev/cru_precip/prn_1986_jan;f:/dev/cru_precip/prn_1986_jul;f:/dev/cru_precip/prn_1986_jun;f:/dev/cru_precip/prn_1986_mar;f:/dev/cru_precip/prn_1986_may;f:/dev/cru_precip/prn_1986_nov;f:/dev/cru_precip/prn_1986_oct;f:/dev/cru_precip/prn_1986_sep;f:/dev/cru_precip/prn_1987_apr;f:/dev/cru_precip/prn_1987_aug;f:/dev/cru_precip/prn_1987_dec;f:/dev/cru_precip/prn_1987_feb;f:/dev/cru_precip/prn_1987_jan;f:/dev/cru_precip/prn_1987_jul;f:/dev/cru_precip/prn_1987_jun;f:/dev/cru_precip/prn_1987_mar;f:/dev/cru_precip/prn_1987_may;f:/dev/cru_precip/prn_1987_nov;f:/dev/cru_precip/prn_1987_oct;f:/dev/cru_precip/prn_1987_sep;f:/dev/cru_precip/prn_1988_apr;f:/dev/cru_precip/prn_1988_aug;f:/dev/cru_precip/prn_1988_dec;f:/dev/cru_precip/prn_1988_feb;f:/dev/cru_precip/prn_1988_jan;f:/dev/cru_precip/prn_1988_jul;f:/dev/cru_precip/prn_1988_jun;f:/dev/cru_precip/prn_1988_mar;f:/dev/cru_precip/prn_1988_may;f:/dev/cru_precip/prn_1988_nov;f:/dev/cru_precip/prn_1988_oct;f:/dev/cru_precip/prn_1988_sep;f:/dev/cru_precip/prn_1989_apr;f:/dev/cru_precip/prn_1989_aug;f:/dev/cru_precip/prn_1989_dec;f:/dev/cru_precip/prn_1989_feb;f:/dev/cru_precip/prn_1989_jan;f:/dev/cru_precip/prn_1989_jul;f:/dev/cru_precip/prn_1989_jun;f:/dev/cru_precip/prn_1989_mar;f:/dev/cru_precip/prn_1989_may;f:/dev/cru_precip/prn_1989_nov;f:/dev/cru_precip/prn_1989_oct;f:/dev/cru_precip/prn_1989_sep"