Hillshade

This tool performs a hillshade operation on an input digital elevation model (DEM). The user must specify the name of the input DEM and the output hillshade image name. Other parameters that must be specified include the Solar Azimuth (i.e. the direction of the sun, from 0-360 degrees), the Solar Altitude (i.e. the elevation of the sun above the horizon, measured as an angle from 0 to 90 degrees) and the Z Conversion Factor. The Z Conversion Factor is only important when the vertical and horizontal units are not the same in the DEM. When this is the case, the algorithm will multiply each elevation in the DEM by the Z Conversion Factor.

Algorithm Description

The tool uses the following formulation to estimate the hillshade value (HS):

HS=
tan(s)

1 - tan(s)20.5
sin(Alt)

tan(s)
-cos(Alt)
sin(Az - a)

Where s and a are the local slope and aspect respectively and Alt and Az are the solar altitude and azimuth respectively. Slope and aspect are calculated using Horn's (1981) 3rd-order finite difference method.

See Also:

Scripting:

The following is an example of a Python script that uses this tool:

wd = pluginHost.getWorkingDirectory()
demFile = wd + "DEM.dep"
outputFile = wd + "output.dep"
azimuth = "315"
altitude = "30.0"
zFactor = "1.0"
args = [demFile, outputFile, azimuth, altitude, zFactor]
pluginHost.runPlugin("Hillshade", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def demFile = wd + "DEM.dep"
def outputFile = wd + "output.dep"
def azimuth = "315"
def altitude = "30.0"
def zFactor = "1.0"
String[] args = [demFile, outputFile, azimuth, altitude zFactor]
pluginHost.runPlugin("Hillshade", args, false)

Credits: