Downslope flowpath length

This tool can be used to calculate the downslope flowpath length from each grid cell in a raster to an outlet cell either at the edge of the grid or at the outlet point of a watershed. The user must specify the name of a flow pointer grid derived using the D8 flow algorithm. This grid should be derived from a digital elevation model that has been pre-processed to remove artifact topographic depressions and flat areas. The user may also optionally provide watershed and weights images. The optional watershed image can be used to define one or more irregular-shaped watershed boundaries. Flowpath lengths are measured within each watershed in the watershed image (each defined by a unique identifying number) as the flowpath length to the watershed's outlet cell. The following is an example of measuring downslope flowpath length for a series of watersheds:

Downslope flowpath length watersheds
Downslope flowpath length

The optional weight image is multiplied by the flowlength through each grid cell. This can be useful when there is a need to convert the units of the output image. For example, the default unit of flowpath lengths is the same as the input image(s). Thus, if the input image has X-Y coordinates measured in metres, the output image will likely contain very large values. A weight image containing a value of 0.001 for each grid cell will effectively convert the output flowpath lengths into kilometres. The weight image can also be used to convert the flowpath distances into travel times by multiplying the flow distance through a grid cell by the average velocity.

NoData valued grid cells in any of the input images 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()
pointerFile = wd + "D8 pointer.dep"
watershedFile = wd + "watersheds.dep"
weightingFile = "not specified"
outputFile = wd + "output.dep"
args = [pointerFile, watershedFile, weightingFile, outputFile]
pluginHost.runPlugin("DownslopeFlowpathLength", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def pointerFile = wd + "D8 pointer.dep"
def watershedFile = wd + "watersheds.dep"
def weightingFile = wd + "weights.dep"
def outputFile = wd + "output.dep"
String[] args = [pointerFile, watershedFile, weightingFile, outputFile]
pluginHost.runPlugin("DownslopeFlowpathLength", args, false)

Credits: