# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # Geomorph_Vorarlberg_model_script.py # Created on: 2021-02-02 17:42:26.00000 # (generated by ArcGIS/ModelBuilder) # Usage: Geomorph_Vorarlberg_model_script # Description: # --------------------------------------------------------------------------- # Import arcpy module import arcpy # Script arguments Input_Shapefile_of_Feature_Class__Geomorphology_Dataset_Vorarlberg_ = arcpy.GetParameterAsText(0) # Local variables: Geomorphology_Vorarlberg_V2__6_ = Input_Shapefile_of_Feature_Class__Geomorphology_Dataset_Vorarlberg_ Geomorphology_Vorarlberg_V2__7_ = Geomorphology_Vorarlberg_V2__6_ Geomorphology_Vorarlberg_V2__4_ = Geomorphology_Vorarlberg_V2__7_ Geomorphology_Vorarlberg_V2__5_ = Geomorphology_Vorarlberg_V2__4_ Geomorphology_Vorarlberg_V2__3_ = Geomorphology_Vorarlberg_V2__5_ Geomorphology_Vorarlberg_V2__2_ = Geomorphology_Vorarlberg_V2__3_ Geomorphology_Vorarlberg_V2 = Geomorphology_Vorarlberg_V2__2_ # Set Geoprocessing environments arcpy.env.scratchWorkspace = "E:\\_Geoinform\\Harry\\GeoMapping\\Data_Multi_level_mapping_versie_13_11_2019\\Au_Nov_2019\\3. Geodatabases\\ToolboxGDB.gdb" arcpy.env.outputCoordinateSystem = "PROJCS['MGI_Austria_GK_West',GEOGCS['GCS_MGI',DATUM['D_MGI',SPHEROID['Bessel_1841',6377397.155,299.1528128]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',-5000000.0],PARAMETER['Central_Meridian',10.33333333333333],PARAMETER['Scale_Factor',1.0],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]]" arcpy.env.geographicTransformations = "" arcpy.env.workspace = "E:\\_Geoinform\\Harry\\GeoMapping\\Data_Multi_level_mapping_versie_13_11_2019\\Au_Nov_2019\\3. Geodatabases\\ArcGIS Data Vorarlberg.gdb" # Process: Add Tier 1 arcpy.AddField_management(Input_Shapefile_of_Feature_Class__Geomorphology_Dataset_Vorarlberg_, "Tier_1", "TEXT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "") # Process: Rename Tier 1 with Text Explanation arcpy.CalculateField_management(Geomorphology_Vorarlberg_V2__6_, "Tier_1", "Tier", "VB", "if [Geomorph] = \"1111\" Then\\nTier = \"1000 - Glacial\"\\nelseif [Geomorph] = \"1112\" Then\\nTier = \"1000 - Glacial\"\\nelseif [Geomorph] = \"1211\" Then\\nTier = \"1000 - Glacial\"\\nelseif [Geomorph] = \"1311\" Then\\nTier = \"1000 - Glacial\"\\nelseif [Geomorph] = \"1312\" Then\\nTier = \"1000 - Glacial\"\\nelseif [Geomorph] = \"1313\" Then\\nTier = \"1000 - Glacial\"\\nelseif [Geomorph] = \"1314\" Then\\nTier = \"1000 - Glacial\"\\nelseif [Geomorph] = \"2111\" Then\\nTier = \"2000 - Fluvial\"\\nelseif [Geomorph] = \"2211\" Then\\nTier = \"2000 - Fluvial\"\\nelseif [Geomorph] = \"2212\" Then\\nTier = \"2000 - Fluvial\"\\nelseif [Geomorph] = \"2213\" Then\\nTier =\"2000 - Fluvial\"\\nelseif [Geomorph] = \"2214\" Then\\nTier =\"2000 - Fluvial\"\\nelseif [Geomorph] = \"3111\" Then\\nTier = \"3000 - Mass movement\"\\nelseif [Geomorph] = \"3112\" Then\\nTier = \"3000 - Mass movement\"\\nelseif [Geomorph] = \"3211\" Then\\nTier =\"3000 - Mass movement\"\\nelseif [Geomorph] = \"3212\" Then\\nTier = \"3000 - Mass movement\"\\nelseif [Geomorph] = \"3213\" Then\\nTier = \"3000 - Mass movement\"\\nelseif [Geomorph] = \"4111\" Then\\nTier = \"4000 - Periglacial\"\\nelseif [Geomorph] = \"4211\" Then\\nTier =\"4000 - Periglacial\"\\nelseif [Geomorph] = \"5111\" Then\\nTier = \"5000 - Organic\"\\nelseif [Geomorph] = \"6111\" Then\\nTier = \"6000 - Karst\"\\nelseif [Geomorph] = \"6211\" Then\\nTier = \"6000 - Karst\"\\nelseif [Geomorph] = \"6212\" Then\\nTier = \"6000 - Karst\"\\nelseif [Geomorph] = \"6213\" Then\\nTier = \"6000 - Karst\"\\nelseif [Geomorph] = \"6214\" Then\\nTier = \"6000 - Karst\"\\nelseif [Geomorph] = \"6215\" Then\\nTier = \"6000 - Karst\"\\nelseif [Geomorph] = \"7111\" Then\\nTier = \"7000 - Aeolian\"\\nelseif [Geomorph] = \"8111\" Then\\nTier = \"8000 - Water\"\\nelseif [Geomorph] = \"8112\" Then\\nTier = \"8000 - Water\"\\nelseif [Geomorph] = \"8113\" Then\\nTier = \"8000 - Water\"\\nelseif [Geomorph] = \"8114\" Then\\nTier = \"8000 - Water\"\\nelseif [Geomorph] = \"9111\" Then\\nTier = \"9000 - Settlements and infrastructure\"\\nelseif [Geomorph] = \"9112\" Then\\nTier = \"9000 - Settlements and infrastructure\"\\nend if") # Process: Add Tier 2 arcpy.AddField_management(Geomorphology_Vorarlberg_V2__7_, "Tier_2", "TEXT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "") # Process: Rename Tier 2 with Text Explanation arcpy.CalculateField_management(Geomorphology_Vorarlberg_V2__4_, "Tier_2", "Tier", "VB", "if [Geomorph] = \"1111\" Then\\nTier = \"1100 - Glacial - Erosion\"\\nelseif [Geomorph] = \"1112\" Then\\nTier = \"1100 - Glacial - Erosion\"\\nelseif [Geomorph] = \"1211\" Then\\nTier = \"1200 - Glacial - (Glacio)fluvial erosion\"\\nelseif [Geomorph] = \"1311\" Then\\nTier = \"1300 - Glacial - Accumulation\"\\nelseif [Geomorph] = \"1312\" Then\\nTier = \"1300 - Glacial - Accumulation\"\\nelseif [Geomorph] = \"1313\" Then\\nTier = \"1300 - Glacial - Accumulation\"\\nelseif [Geomorph] = \"1314\" Then\\nTier = \"1300 - Glacial - Accumulation\"\\nelseif [Geomorph] = \"2111\" Then\\nTier = \"2100 - Fluvial - Erosion\"\\nelseif [Geomorph] = \"2211\" Then\\nTier = \"2200 - Fluvial - Accumulation\"\\nelseif [Geomorph] = \"2212\" Then\\nTier = \"2200 - Fluvial - Accumulation\"\\nelseif [Geomorph] = \"2213\" Then\\nTier = \"2200 - Fluvial - Accumulation\"\\nelseif [Geomorph] = \"2214\" Then\\nTier = \"2200 - Fluvial - Accumulation\"\\nelseif [Geomorph] = \"3111\" Then\\nTier = \"3100 - Mass movement - Degradation\"\\nelseif [Geomorph] = \"3112\" Then\\nTier = \"3100 - Mass movement - Degradation\"\\nelseif [Geomorph] = \"3211\" Then\\nTier = \"3200 - Mass movement - Accumulation\"\\nelseif [Geomorph] = \"3212\" Then\\nTier = \"3200 - Mass movement - Accumulation\"\\nelseif [Geomorph] = \"3213\" Then\\nTier = \"3200 - Mass movement - Accumulation\"\\nelseif [Geomorph] = \"4111\" Then\\nTier = \"4100 - Periglacial - Disintegration\"\\nelseif [Geomorph] = \"4211\" Then\\nTier = \"4200 - Periglacial - Accumulation\"\\nelseif [Geomorph] = \"5111\" Then\\nTier = \"5100 - Organic\"\\nelseif [Geomorph] = \"6111\" Then\\nTier = \"6100 - Carbonate karst\"\\nelseif [Geomorph] = \"6211\" Then\\nTier = \"6200 - Sulphate karst\"\\nelseif [Geomorph] = \"6212\" Then\\nTier = \"6200 - Sulphate karst\"\\nelseif [Geomorph] = \"6213\" Then\\nTier = \"6200 - Sulphate karst\"\\nelseif [Geomorph] = \"6214\" Then\\nTier =\"6200 - Sulphate karst\"\\nelseif [Geomorph] = \"6215\" Then\\nTier = \"6200 - Sulphate karst\"\\nelseif [Geomorph] = \"7111\" Then\\nTier = \"7100 - Aeolian\"\\nelseif [Geomorph] = \"8111\" Then\\nTier = \"8100 - Water\"\\nelseif [Geomorph] = \"8112\" Then\\nTier = \"8100 - Water\"\\nelseif [Geomorph] = \"8113\" Then\\nTier = \"8100 - Water\"\\nelseif [Geomorph] = \"8114\" Then\\nTier = \"8100 - Water\"\\nelseif [Geomorph] = \"9111\" Then\\nTier = \"9100 - Settlements and infrastructure\"\\nelseif [Geomorph] = \"9112\" Then\\nTier = \"9100 - Settlements and infrastructure\"\\nend if") # Process: Add Tier 3 arcpy.AddField_management(Geomorphology_Vorarlberg_V2__5_, "Tier_3", "TEXT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "") # Process: Rename Tier 3 with Text Explanation arcpy.CalculateField_management(Geomorphology_Vorarlberg_V2__3_, "Tier_3", "Tier", "VB", "if [Geomorph] = \"1111\" Then\\nTier = \"1111 - Glacially eroded bedrock\"\\nelseif [Geomorph] = \"1112\" Then\\nTier = \"1112 - Glacially eroded Quaternary deposits\"\\nelseif [Geomorph] = \"1211\" Then\\nTier = \"1211 - (Glacio)fluvial erosion\"\\nelseif [Geomorph] = \"1311\" Then\\nTier = \"1311 - Subglacial tills\"\\nelseif [Geomorph] = \"1312\" Then\\nTier = \"1312 - Ablation tills\"\\nelseif [Geomorph] = \"1313\" Then\\nTier = \"1313 - (Glacio)fluvial deposits\"\\nelseif [Geomorph] = \"1314\" Then\\nTier = \"1314- Lake deposits\"\\nelseif [Geomorph] = \"2111\" Then\\nTier = \"2111 - Incision; slope subject to strong fluvial erosion\"\\nelseif [Geomorph] = \"2211\" Then\\nTier = \"2211 - (Sub)recent streambed\"\\nelseif [Geomorph] = \"2212\" Then\\nTier = \"2212 - Fluvial terrace (incl. small escarpment)\"\\nelseif [Geomorph] = \"2213\" Then\\nTier = \"2213 - Alluvial fan, debris fan (incl. terrace)\"\\nelseif [Geomorph] = \"2214\" Then\\nTier = \"2214 - Lake deposits\"\\nelseif [Geomorph] = \"3111\" Then\\nTier = \"3111 - Deep-seated mass movement\"\\nelseif [Geomorph] = \"3112\" Then\\nTier = \"3112 - Shallow mass movement (degradation)\"\\nelseif [Geomorph] = \"3211\" Then\\nTier = \"3211 - Fall deposits\"\\nelseif [Geomorph] = \"3212\" Then\\nTier = \"3212 - Flow and/or slide deposits\"\\nelseif [Geomorph] = \"3213\" Then\\nTier = \"3213 - Protalus rampart\"\\nelseif [Geomorph] = \"4111\" Then\\nTier = \"4111 - Surface subject to disintegration\"\\nelseif [Geomorph] = \"4211\" Then\\nTier = \"4211 - Rock glacier\"\\nelseif [Geomorph] = \"5111\" Then\\nTier = \"5111 - Peat deposits\"\\nelseif [Geomorph] = \"6111\" Then\\nTier = \"6111 - Surface strongly affected by carbonate karst\"\\nelseif [Geomorph] = \"6211\" Then\\nTier = \"6211 - Surface strongly affected by sulphate (gypsum) karst\"\\nelseif [Geomorph] = \"6212\" Then\\nTier = \"6212 - Covered gypsum karst (glacial deposits)\"\\nelseif [Geomorph] = \"6213\" Then\\nTier = \"6213 - Covered gypsum karst (slope deposits)\"\\nelseif [Geomorph] = \"6214\" Then\\nTier = \"6214 - Collapse structure due to gypsum karst\"\\nelseif [Geomorph] = \"6215\" Then\\nTier = \"6215 - Breccia exposure\"\\nelseif [Geomorph] = \"7111\" Then\\nTier = \"7111 - Aeolian deposits\"\\nelseif [Geomorph] = \"8111\" Then\\nTier = \"8111 - Lake and its fill\"\\nelseif [Geomorph] = \"8112\" Then\\nTier = \"8112 - Wide river\"\\nelseif [Geomorph] = \"8113\" Then\\nTier = \"8113 - Reservoir and its fill\"\\nelseif [Geomorph] = \"8114\" Then\\nTier = \"8114 - Glacier\"\\nelseif [Geomorph] = \"9111\" Then\\nTier = \"9111 - Graded or leveled land\"\\nelseif [Geomorph] = \"9112\" Then\\nTier = \"9112 - Pits and quarries\"\\nend if") # Process: Delete unnecessary fields arcpy.DeleteField_management(Geomorphology_Vorarlberg_V2__2_, "Geomorph")