Swiss hillshading

From Bellman
Jump to navigation Jump to search

ESRI models are great and all that but don't generally work and are hard to document... so I exported to Python

import arcpy


arcpy.env.scratchWorkspace = "C:\\Temp\\ScratchWorkspace"
arcpy.env.workspace = "C:\\Temp"

# Set up the parameters

Input_DEM = "C:\\Temp\\dem"
Z_factor = "1"
Divide_By = "5"

# Temp outputs
Standard_Hillshade = "C:\\Temp\\ScratchWorkspace\\hillshade"
DEM_divided = "C:\\Temp\\ScratchWorkspace\\dem_divided"

# Final outputs
Filtered_Hillshade = "c:\\Temp\\Filtered_Hshd"
Aerial_Perspective = "C:\\Temp\\Aerial_Persp"

# Create a DEM that's 20% of the original, Divide_By, DEM_divided)

# PHASE 1: Create a standard hillshade to be used only as input to second phase, Standard_Hillshade, "315", "45", "NO_SHADOWS", Z_factor)

# I think this knocks down detail (generalize), Filtered_Hillshade, "Rectangle 4 4 CELL", "MEDIAN", "DATA")

# Add the generalized DEM to the hillshade, Standard_Hillshade, Aerial_Perspective)

# We're done!