building_w_multiple_ED_1_shp__2_ = "C:\\LocalGIS\\OSM\\model\\split\\building_w_multiple_ED_9.shp" building_w_multiple_ED_1_Sim = "C:\\Users\\eplack\\Documents\\ArcGIS\\Default.gdb\\building_w_multiple_ED_1_Sim" address_unmatched_ED_1_shp__2_ = "C:\\LocalGIS\\OSM\\model\\split\\address_unmatched_ED_9.shp" building_address_w_single__3_ = "Import\\building_address_w_single" selected_buildings = "Import\\building_w_multiple" address_not_matched__3_ = "Import\\address_not_matched" # Process: Iterate Feature Selection arcpy.IterateFeatureSelection_mb(ADMIN_ElectionDistricts, "", "false") # Process: Select Layer By Location arcpy.SelectLayerByLocation_management(building_address_w_single, "INTERSECT", districtIterator, "", "NEW_SELECTION") # Process: getDistrictNum arcpy.GetFieldValue_mb(districtIterator, "ELECTION_DISTRICTS", "String", "water") # Process: rename building_w_single arcpy.CalculateValue_management( "ElectionDistrict (\"%ElectionDistrict%\")", "def ElectionDistrict (ElectionDistrict):\\n outputName=\"\"\"building_address_w_single_ED_%ElectionDistrict%\"\"\"\\n return outputName", "String") # Process: Feature Class to Feature Class (4) arcpy.FeatureClassToFeatureClass_conversion( building_address_w_single__3_, split, output_value, "", "Join_Count \"Join_Count\" true true false 4 Long 0 0 ,First,#,C:\\LocalGIS\\OSM\\OSM-BaCo.gdb\\building_address_w_single,Join_Count,-1,-1;TARGET_FID \"TARGET_FID\" true true false 4 Long 0 0 ,First,#,C:\\LocalGIS\\OSM\\OSM-BaCo.gdb\\building_address_w_single,TARGET_FID,-1,-1;BUILDING \"FEATURE_TYPE\" true true false 50 Text 0 0 ,First,#,C:\\LocalGIS\\OSM\\OSM-BaCo.gdb\\building_address_w_single,BUILDING,-1,-1;ADDR_HOUSE \"ADDR_HOUSENUMBER\" true true false 21 Text 0 0 ,First,#,C:\\LocalGIS\\OSM\\OSM-BaCo.gdb\\building_address_w_single,ADDR_HOUSENUMBER,-1,-1;ADDR_STREE \"ADDR_STREET\" true true false 169 Text 0 0 ,First,#,C:\\LocalGIS\\OSM\\OSM-BaCo.gdb\\building_address_w_single,ADDR_STREET,-1,-1;ADDR_STATE \"ADDR_STATE\" true true false 2 Text 0 0 ,First,#,C:\\LocalGIS\\OSM\\OSM-BaCo.gdb\\building_address_w_single,ADDR_STATE,-1,-1;ADDR_CITY \"ADDR_CITY\" true true false 40 Text 0 0 ,First,#,C:\\LocalGIS\\OSM\\OSM-BaCo.gdb\\building_address_w_single,ADDR_CITY,-1,-1;SHAPE_Leng \"SHAPE_Leng\" false true true 8 Double 0 0 ,First,#,C:\\LocalGIS\\OSM\\OSM-BaCo.gdb\\building_address_w_single,SHAPE_Length,-1,-1;SHAPE_Area \"SHAPE_Area\" false true true 8 Double 0 0 ,First,#,C:\\LocalGIS\\OSM\\OSM-BaCo.gdb\\building_address_w_single,SHAPE_Area,-1,-1;POSTCODE \"POSTCODE\" true true false 50 Text 0 0 ,First,#,C:\\LocalGIS\\OSM\\OSM-BaCo.gdb\\building_address_w_single,POSTCODE,-1,-1", "") # Process: Simplify Polygon arcpy.SimplifyPolygon_cartography(building_address_w_single_ED_10_shp,
# And replace arcpy.gp.DropDownList2(...) with arcpy.DropDownList2_ALIAS(...) arcpy.gp.DropDownList2(Input_Aircraft, Aircraft_Model, Helicopter) # Process: Make Table View arcpy.MakeTableView_management( Aircraft_Specifications, Aircraft_Specifications_View, "Model='%Selected Aircraft Model%'", "", "OBJECTID OBJECTID VISIBLE NONE;Model Model VISIBLE NONE;Nickname Nickname VISIBLE NONE;TDP_Diameter_Meters TDP_Diameter_Meters VISIBLE NONE;Ground_Slope_Max_Degrees Ground_Slope_Max_Degrees VISIBLE NONE;Obstacle_Max_Size_Inches Obstacle_Max_Size_Inches VISIBLE NONE;Crosswind_Max_Knots Crosswind_Max_Knots VISIBLE NONE;Tailwind_Max_Knots Tailwind_Max_Knots VISIBLE NONE;Ground_Slope_Min_Degrees Ground_Slope_Min_Degrees VISIBLE NONE;Obstacle_Min_Size_Inches Obstacle_Min_Size_Inches VISIBLE NONE;Crosswind_Min_Knots Crosswind_Min_Knots VISIBLE NONE;Tailwind_Min_Knots Tailwind_Min_Knots VISIBLE NONE;Slope_Suitability_Value Slope_Suitability_Value VISIBLE NONE;Speed_Suitability_Value Speed_Suitability_Value VISIBLE NONE;Direction_Suitability_Value Direction_Suitability_Value VISIBLE NONE" ) # Process: Copy Rows arcpy.CopyRows_management(Aircraft_Specifications_View, Aircraft_Specifications_Copy, "") # Process: Get TDP Diameter arcpy.GetFieldValue_mb(Aircraft_Specifications_Copy, "TDP_Diameter_Meters", "Long", "0") # Process: Clip arcpy.Clip_management( Slope_Layer, "7844294.9969 4086097.0724 7844423.6824 4086153.8607", Slope_Clip, Areas_layer, "", "NONE", "NO_MAINTAIN_EXTENT") # Process: Get Max Slope arcpy.GetFieldValue_mb(Aircraft_Specifications_Copy, "Ground_Slope_Max_Degrees", "Long", "0") # Process: Con arcpy.gp.Con_sa(Slope_Clip, Input_true_constant__1, Slope_LT_MaxSlopeValue, "", "\"VALUE\" <= %MaxSlopeValue%") # Process: Raster to Polygon
"def CalcCellSize(ds):\\n desc = arcpy.Describe(ds)\\n mx = max(desc.extent.width,desc.extent.height)\\n return float(mx/2000.0)", "Cell Size") # Process: Extract by Mask tempEnvironment0 = arcpy.env.cellSize arcpy.env.cellSize = "1" arcpy.gp.ExtractByMask_sa(Slope_Layer, AOI, clippedelev) arcpy.env.cellSize = tempEnvironment0 # Process: Query for Max Slope Value arcpy.Statistics_analysis(Aircraft_Specifications, Aircraft_Specifications_Stat, "Ground_Slope_Max_Degrees MAX", "") # Process: Get Max Slope Value arcpy.GetFieldValue_mb(Aircraft_Specifications_Stat, "MAX_Ground_Slope_Max_Degrees", "Double", "0") # Process: Con arcpy.gp.Con_sa(clippedelev, Input_true_constant__1, Slope_ < __MaxSlopeValue, "", "\"VALUE\" <= %Maximum_Ground_Slope%") # Process: Raster to Polygon arcpy.RasterToPolygon_conversion(Slope_ < __MaxSlopeValue, Slope_Polys, "SIMPLIFY", "VALUE") # Process: Intersect arcpy.Intersect_analysis( "CombinedVegetationCoverage_C #;'C:\\work\\dcgsa\\huachuca\\templates\\Helicopter Landing Zone\\Maps\\Scratch.gdb\\RasterT_suitabl1' #", clippedveg_Intersect, "ALL", "", "INPUT") # Process: Optionally Union Feature Classes
arcpy.PointDistance_analysis(inventory_layer_not_accessible_areas_centroid, Destination_Feature, distance_not_accessible, "") # Process: Join Field arcpy.JoinField_management(fbks_stands_Erase, "OBJECTID", distance_not_accessible, "INPUT_FID", "DISTANCE") # Process: Add Field 2 - DISTANCE_FINAL arcpy.AddField_management(inventory_layer_not_accessible_areas__3_, "DISTANCE_FINAL", "DOUBLE", "", "", "", "", "NULLABLE", "NON_REQUIRED", "") # Process: Collect Values (5) arcpy.CollectValues_mb("10") # Process: Summary Statistics arcpy.Statistics_analysis(inventory_layer_access, statisticssum, "DISTANCE_FINAL MAX", "") # Process: Get Field Value arcpy.GetFieldValue_mb(statisticssum, "MAX_DISTANCE_FINAL", "Double", "0") # Process: Calculate Field (2) arcpy.CalculateField_management(inventory_layer_not_accessible_areas__2_, "DISTANCE_FINAL", "[DISTANCE]/1609.344+(%Value%*%Faktor%)", "VB", "") # Process: Merge (2) arcpy.Merge_management("in_memory\\inventory_layer_CopyFeatures;in_memory\\fbks_stands_Erase", mee, "STRATUM \"STRATUM\" true true false 2 Short 0 0 ,First,#,in_memory\\fbks_stands_Erase,STRATUM,-1,-1,in_memory\\inventory_layer_CopyFeatures,STRATUM,-1,-1;ACRES \"ACRES\" true true false 8 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,ACRES,-1,-1,in_memory\\inventory_layer_CopyFeatures,ACRES,-1,-1;Date_Typed \"Date_Typed\" true true false 50 Text 0 0 ,First,#,in_memory\\fbks_stands_Erase,Date_Typed,-1,-1,in_memory\\inventory_layer_CopyFeatures,Date_Typed,-1,-1;Density_Ca \"Density_Ca\" true true false 50 Text 0 0 ,First,#,in_memory\\fbks_stands_Erase,Density_Ca,-1,-1,in_memory\\inventory_layer_CopyFeatures,Density_Ca,-1,-1;Veg_Call \"Veg_Call\" true true false 50 Text 0 0 ,First,#,in_memory\\fbks_stands_Erase,Veg_Call,-1,-1,in_memory\\inventory_layer_CopyFeatures,Veg_Call,-1,-1;Size_Call \"Size_Call\" true true false 50 Text 0 0 ,First,#,in_memory\\fbks_stands_Erase,Size_Call,-1,-1,in_memory\\inventory_layer_CopyFeatures,Size_Call,-1,-1;Veg_Code \"Veg_Code\" true true false 6 Text 0 0 ,First,#,in_memory\\fbks_stands_Erase,Veg_Code,-1,-1,in_memory\\inventory_layer_CopyFeatures,Veg_Code,-1,-1;Shape_Leng \"Shape_Leng\" true true false 8 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,Shape_Leng,-1,-1,in_memory\\inventory_layer_CopyFeatures,Shape_Leng,-1,-1;Gross_CF \"Gross_CF\" true true false 8 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,Gross_CF,-1,-1,in_memory\\inventory_layer_CopyFeatures,Gross_CF,-1,-1;Net_BF \"Net_BF\" true true false 8 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,Net_BF,-1,-1,in_memory\\inventory_layer_CopyFeatures,Net_BF,-1,-1;Tons_Acre \"Tons_Acre\" true true false 8 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,Tons_Acre,-1,-1,in_memory\\inventory_layer_CopyFeatures,Tons_Acre,-1,-1;Stand_Tons \"Stand_Tons\" true true false 8 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,Stand_Tons,-1,-1,in_memory\\inventory_layer_CopyFeatures,Stand_Tons,-1,-1;Stand_CF \"Stand_CF\" true true false 8 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,Stand_CF,-1,-1,in_memory\\inventory_layer_CopyFeatures,Stand_CF,-1,-1;Stand_BF \"Stand_BF\" true true false 8 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,Stand_BF,-1,-1,in_memory\\inventory_layer_CopyFeatures,Stand_BF,-1,-1;Shape_Length \"Shape_Length\" false true true 8 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,Shape_Length,-1,-1,in_memory\\fbks_stands_Erase,Shape_length,-1,-1,in_memory\\inventory_layer_CopyFeatures,Shape_Length,-1,-1;Shape_Area \"Shape_Area\" false true true 8 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,Shape_Area,-1,-1,in_memory\\fbks_stands_Erase,Shape_area,-1,-1,in_memory\\inventory_layer_CopyFeatures,Shape_Area,-1,-1;DISTANCE \"DISTANCE\" true true false 8 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,DISTANCE,-1,-1,in_memory\\inventory_layer_CopyFeatures,DISTANCE,-1,-1;DISTANCE_FINAL \"DISTANCE_FINAL\" true true false 0 Double 0 0 ,First,#,in_memory\\fbks_stands_Erase,DISTANCE_FINAL,-1,-1,in_memory\\inventory_layer_CopyFeatures,DISTANCE_FINAL,-1,-1;AREA \"AREA\" true true false 0 Long 0 0 ,First,#,in_memory\\inventory_layer_CopyFeatures,AREA,-1,-1;DIST_MILES \"DIST_MILES\" true true false 8 Double 0 0 ,First,#,in_memory\\inventory_layer_CopyFeatures,DIST_MILES,-1,-1") # Process: Add Field (TRANSPORT_PRICE) arcpy.AddField_management(mee, "TRANSPORT_PRICE", "DOUBLE", "", "2", "", "", "NULLABLE", "NON_REQUIRED", "") # Process: Collect Values arcpy.CollectValues_mb("0.505") # Process: Calculate Field (3) arcpy.CalculateField_management(inventory_layer_wdistance__2_, "TRANSPORT_PRICE", "price", "VB", "dim price\\n\\nif %TRANSPORT_PRICE_TON_MILE% <> 0 and [DISTANCE_FINAL] <> 0 then\\n price = [DISTANCE_FINAL]*%TRANSPORT_PRICE_TON_MILE%\\nelse\\n price = 0\\nend if")
Value = "1330" I_sample_points_pointid__2_ = I_sample_points1_pointid viewshed_value_ = "C:\\datatemp\\cum_viewshed.gdb\\viewshed%value%" datatemp_gdb = "C:\\datatemp\\datatemp.gdb" point = "C:\\datatemp\\datatemp.gdb\\point" viewnumber = point sites1_gdb = "C:\\datatemp\\sites1.gdb" # Process: Iterate Feature Selection arcpy.IterateFeatureSelection_mb(Input_site_locations, "pointid #", "false") # Process: Table to Table arcpy.TableToTable_conversion(viewshed_value_, datatemp_gdb, "point", "\"Value\" = 1", "Value \"Value\" false true false 4 Long 0 0 ,First,#,C:\\datatemp\\cum_viewshed.gdb\\viewshed%value%\\Band_1,Value,-1,-1;Count \"Count\" false true false 8 Double 0 0 ,First,#,C:\\datatemp\\cum_viewshed.gdb\\viewshed%value%\\Band_1,Count,-1,-1", "") # Process: Get Field Value arcpy.GetFieldValue_mb(point, "COUNT", "Long", "0") # Process: Calculate Field (2) arcpy.CalculateField_management(I_sample_points1_pointid, "visible", "%viewnumber%", "PYTHON_9.3", "") #Step 7:Taking the observation points, creates a buffer where then the clip function removes the remaining raster (naismith_cost). Returns cost distance function (value) # Load required toolboxes arcpy.ImportToolbox("Model Functions") # Script arguments cumcost_gdb = arcpy.GetParameterAsText(0) if cumcost_gdb == '#' or not cumcost_gdb: cumcost_gdb = "C:\\datatemp\\cumcost.gdb" # provide a default value if unspecified site_points = arcpy.GetParameterAsText(1) if site_points == '#' or not site_points: