Number of downslope neighbours

This tool calculates the number of downslope neighbours of each grid cell in a raster digital elevation model (DEM). The user must specify the name of the input DEM and the output raster name. The tool examines the eight neighbouring cells for each grid cell in a the DEM and calculates the number of neighbours with an elevation less than the centre cell of the 3 x 3 window. The output image can therefore have values raning from 0 to 8. A grid cell with 8 downslope neighbours is a peak and a cell with 0 downslope neighbours is a pit. This tool can be used with the Number of Upslope Neighbours tool to assess the degree of local flow divergence/convergence.

See Also:


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

wd = pluginHost.getWorkingDirectory()
demFile = wd + "DEM.dep"
outputFile = wd + "output.dep"
args = [demFile, outputFile]
pluginHost.runPlugin("NumDownslopeNeighbours", 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"
String[] args = [demFile, outputFile]
pluginHost.runPlugin("NumDownslopeNeighbours", args, false)