# --------------------------------------------------------------------------- # model.py # Created on: Wed Apr 05 2006 06:38:35 PM # (generated by ArcGIS/ModelBuilder) # --------------------------------------------------------------------------- # Import system modules import sys, string, os, win32com.client # Create the Geoprocessor object gp = win32com.client.Dispatch("esriGeoprocessing.GpDispatch.1") # Check out any necessary licenses gp.CheckOutExtension("spatial") gp.CheckOutExtension("3D") # Load required toolboxes... gp.AddToolbox("E:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Conversion Tools.tbx") gp.AddToolbox("E:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Spatial Analyst Tools.tbx") gp.AddToolbox("E:/Program Files/ArcGIS/ArcToolbox/Toolboxes/Analysis Tools.tbx") gp.AddToolbox("E:/Program Files/ArcGIS/ArcToolbox/Toolboxes/3D Analyst Tools.tbx") # Local variables... eskers = "eskers" dist_eskers = "M:\\Geog255\\255final\\dist_eskers" Output_direction_raster = "" lakes = "lakes" lake_raster = "M:\\Geog255\\255final\\lake_raster" dem = "dem" slope_dem = "M:\\Geog255\\255final\\slope_dem" Reclass_slop1 = "M:\\Geog255\\255final\\Reclass_slop1" Reclass_lake1 = "M:\\Geog255\\255final\\Reclass_lake1" surfgeol = "surfgeol" Feature_surf1 = "M:\\Geog255\\termasn\\feature_surf1" Reclass_Feat1 = "M:\\Geog255\\termasn\\Reclass_Feat1" eskers__2_ = "M:\\Geog255\\255final\\eskers" Output_raster__4_ = "M:\\Geog255\\255final\\Plus_Reclass3" Reclass_dist1 = "M:\\Geog255\\255final\\Reclass_dist1" Output_raster__6_ = "M:\\Geog255\\255final\\Plus_Reclass1" Output_raster__7_ = "M:\\Geog255\\255final\\Plus_Plus_Re1" economic = "M:\\Geog255\\255final\\economic" streams = "streams" wolfdens = "wolfdens" archsites = "archsites" archsites_Buffer_shp = "M:\\Geog255\\termasn\\archsites_Buffer.shp" wolfdens_Buffer_shp = "M:\\Geog255\\termasn\\wolfdens_Buffer.shp" str_buff_shp = "M:\\Geog255\\255final\\str_buff.shp" reclass_arch2 = "M:\\Geog255\\255final\\reclass_arch2" Reclass_wolf1 = "M:\\Geog255\\255final\\Reclass_wolf1" Reclass_Feat1__2_ = "M:\\Geog255\\255final\\Reclass_Feat1" arch_rast = "M:\\Geog255\\255final\\arch_rast" wolfden_rast = "M:\\Geog255\\255final\\wolfden_rast" Feature_stre1 = "M:\\Geog255\\255final\\feature_str_1" Output_raster__15_ = "M:\\Geog255\\255final\\Plus_Reclass4" enviro = "M:\\Geog255\\255final\\enviro" EEcombo = "M:\\Geog255\\255final\\EEcombo" Reclass_eske1 = "M:\\Geog255\\255final\\Reclass_eske1" costdist = "M:\\Geog255\\255final\\costdist" blacklink = "M:\\Geog255\\255final\\blacklink" lupin = "lupin" expsite = "expsite" costpath = "M:\\Geog255\\255final\\costpath" # Process: Euclidean Distance... gp.EucDistance_sa(eskers, dist_eskers, "", "100", Output_direction_raster) # Process: Buffer (3)... gp.Buffer_analysis(streams, str_buff_shp, "500 Meters", "FULL", "ROUND", "NONE", "") # Process: Feature to Raster (6)... gp.FeatureToRaster_conversion(str_buff_shp, "LENGTH", Feature_stre1, "100") # Process: Reclassify (7)... gp.Reclassify_sa(Feature_stre1, "VALUE", "15.231550216674805 500 10;500 5050.0869140625 0", Reclass_Feat1__2_, "DATA") # Process: Buffer... gp.Buffer_analysis(archsites, archsites_Buffer_shp, "500 Meters", "FULL", "ROUND", "NONE", "") # Process: Feature to Raster (4)... gp.FeatureToRaster_conversion(archsites_Buffer_shp, "CONTENTS", arch_rast, "100") # Process: Reclassify (5)... gp.Reclassify_sa(arch_rast, "Value", "1 10", reclass_arch2, "DATA") # Process: Buffer (2)... gp.Buffer_analysis(wolfdens, wolfdens_Buffer_shp, "1000 Meters", "FULL", "ROUND", "NONE", "") # Process: Feature to Raster (5)... gp.FeatureToRaster_conversion(wolfdens_Buffer_shp, "DEN", wolfden_rast, "100") # Process: Reclassify (6)... gp.Reclassify_sa(wolfden_rast, "Value", "1 10", Reclass_wolf1, "DATA") # Process: Plus (5)... gp.Plus_sa(reclass_arch2, Reclass_wolf1, Output_raster__15_) # Process: Plus (6)... gp.Plus_sa(Reclass_Feat1__2_, Output_raster__15_, enviro) # Process: Slope... gp.Slope_sa(dem, slope_dem, "DEGREE", "1") # Process: Reclassify... gp.Reclassify_sa(slope_dem, "Value", "0 2 0;2 4 3;4 6 6;6 8 8;8 19.671970367431641 10", Reclass_slop1, "DATA") # Process: Feature to Raster (3)... gp.FeatureToRaster_conversion(eskers, "CODE", eskers__2_, "100") # Process: Reclassify (8)... gp.Reclassify_sa(eskers__2_, "Value", "1 10", Reclass_eske1, "DATA") # Process: Reclassify (4)... gp.Reclassify_sa(dist_eskers, "Value", "0 1000 0;1000 2000 3;2000 24011.167025654682 6", Reclass_dist1, "DATA") # Process: Plus... gp.Plus_sa(Reclass_eske1, Reclass_dist1, Output_raster__4_) # Process: Feature to Raster... gp.FeatureToRaster_conversion(lakes, "AREA", lake_raster, "100") # Process: Reclassify (2)... gp.Reclassify_sa(lake_raster, "VALUE", "4557 978594496 1", Reclass_lake1, "DATA") # Process: Feature to Raster (2)... gp.FeatureToRaster_conversion(surfgeol, "CODE", Feature_surf1, "100") # Process: Reclassify (3)... gp.Reclassify_3d(Feature_surf1, "Value", "1 10;2 3;3 10;4 1;5 10;6 10;7 10;8 10;9 10;10 2;11 4;12 10;13 10", Reclass_Feat1, "DATA") # Process: Plus (2)... gp.Plus_sa(Reclass_lake1, Reclass_Feat1, Output_raster__6_) # Process: Plus (3)... gp.Plus_sa(Output_raster__4_, Output_raster__6_, Output_raster__7_) # Process: Plus (4)... gp.Plus_sa(Reclass_slop1, Output_raster__7_, economic) # Process: Plus (7)... gp.Plus_sa(enviro, economic, EEcombo) # Process: Cost Distance... gp.CostDistance_sa(lupin, EEcombo, costdist, "", blacklink) # Process: Cost Path... gp.CostPath_sa(expsite, costdist, blacklink, costpath, "BEST_SINGLE", "Id")