Swiss hillshading

From Wildsong
Revision as of 17:06, 28 March 2014 by Brian Wilson (talk | contribs) (Created page with "http://mappractical.blogspot.com/2011/09/swiss-hillshade-model-in-arcmap.html <pre> # Import arcpy module import arcpy # Check out any necessary licenses arcpy.CheckOutExten...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

http://mappractical.blogspot.com/2011/09/swiss-hillshade-model-in-arcmap.html

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")

# Set Geoprocessing environments
arcpy.env.scratchWorkspace = "C:\\Temp\\ScratchWorkspace"
arcpy.env.workspace = "C:\\Temp"

Input_DEM = "C:\\Temp\\dem"
Z_factor = "1"
Filtered_Hillshade = "c:\\Temp\\Filtered_Hshd"
Aerial_Perspective = "C:\\Temp\\Aerial_Persp"

Standard_Hillshade = "C:\\Temp\\ScratchWorkspace\\hillshade"
Divide_By = "5"
DEM_divided = "C:\\Temp\\ScratchWorkspace\\dem_divided"

# Process: Divide
arcpy.gp.Divide_sa(Input_DEM, Divide_By, DEM_divided)

# Process: Hillshade
arcpy.gp.HillShade_sa(Input_DEM, Standard_Hillshade, "315", "45", "NO_SHADOWS", Z_factor)

# Process: Focal Statistics
arcpy.gp.FocalStatistics_sa(Standard_Hillshade, Filtered_Hillshade, "Rectangle 4 4 CELL", "MEDIAN", "DATA")

# Process: Plus
arcpy.gp.Plus_sa(DEM_divided, Standard_Hillshade, Aerial_Perspective)