Furthest upstream channel head distance

This tool calculates the upstream distance to the furthest stream head for each grid cell belonging to a raster stream network. The user must specify the name of a raster containing streams data, where stream grid cells are denoted by all positive non-zero values, and a D8 flow pointer (i.e. flow direction) raster. The pointer image is used to traverse the stream network and must only be created using the D8 algorithm.


See Also:

Scripting:

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

wd = pluginHost.getWorkingDirectory()
streamsFile = wd + "streams.dep"
pointerFile = wd + "D8 pointer.dep"
outputFile = wd + "output.dep"
args = [streamsFile, pointerFile, outputFile]
pluginHost.runPlugin("FurthestUpstreamChannelHeadDistance", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def streamsFile = wd + "streams.dep"
def pointerFile = wd + "D8 pointer.dep"
def outputFile = wd + "output.dep"
String[] args = [streamsFile, pointerFile, outputFile]
pluginHost.runPlugin("FurthestUpstreamChannelHeadDistance", args, false)


Credits: