Slope

This tool calculates slope gradient (i.e. slope steepness in degrees) for each grid cell in an input digital elevation model (DEM). The user must specify the name of the input DEM and the output raster image. 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. If the DEM is in the geographic coordinate system (latitude and longitude), with XY units measured in degrees, an appropriate Z Conversion Factor would be a value of approximately 0.000003, although this will vary somewhat by latitude. If the XY units of the raster are set to degrees or the projection set to geographic coordinates, the tool will automatically calculate an appropriate value for the Z Conversion Factor.

Algorithm Description

The tool uses Horn's (1981) 3rd-order finite difference method to estimate slope. Given the following clock-type grid cell numbering scheme (Gallant and Wilson, 2000),

Neighbourhood Numbering

slope = arctan(fx2 + fy2)0.5

where,

fx = (z3 - z5 + 2(z2 - z6) + z1 - z7)

and,

fy = (z7 - z5 + 2(z8 - z4) + z1 - z3)

See Also:

Scripting:

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

wd = pluginHost.getWorkingDirectory()
inputFile = wd + "DEM.dep"
outputFile = wd + "slope.dep"
zFactor = "1.0"
args = [inputFile, outputFile, zFactor]
pluginHost.runPlugin("Slope", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def inputFile = wd + "DEM.dep"
def outputFile = wd + "slope.dep"
def zFactor = "1.0"
String[] args = [inputFile, outputFile, zFactor]
pluginHost.runPlugin("Slope", args, false)

Credits:

References: