Average flowpath slope from cell to divide

This tool calculates the average slope gradient (i.e. slope steepness in degrees) of the flowpaths that run through each grid cell in an input digital elevation model (DEM) to the upslope divide cells. The user must specify the name of a flow pointer grid derived using the D8 flow algorithm.The user must also 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.

Four temporary images are created during the operation of this tool. Each of the temporary images should be automatically deleted upon successful completion. NoData valued grid cells in the input pointer image will be assigned NoData values in the output image. The output raster is of the float data type and continuous data scale.

See Also:

Scripting:

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

wd = pluginHost.getWorkingDirectory()
inputPointer = wd + "D8 pointer.dep"
inputDEM = wd + "DEM.dep"
outputFile = wd + "output.dep"
zFactor = "1.0"
args = [inputPointer, inputDEM, outputFile, zFactor]
pluginHost.runPlugin("AverageSlopeToDivide", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def inputPointer = wd + "D8 pointer.dep"
def inputDEM = wd + "DEM.dep"
def outputFile = wd + "output.dep"
def zFactor = "1.0"
String[] args = [inputPointer, inputDEM, outputFile, zFactor]
pluginHost.runPlugin("AverageSlopeToDivide", args, false)

Credits: