Stream link length

This tool can be used to measure the length of each link in a stream network. The user must specify the names of a stream link ID raster image and D8 pointer image. The pointer image is used to traverse the stream network and should only be created using the D8 algorithm. Stream cells are designated in the stream link ID image as all non-zero, positive values. Background cells will be assigned the NoData value in the output image. The output raster is of a 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()
streamsID = wd + "stream ID.dep"
pointerFile = wd + "D8 pointer.dep"
outputFile = wd + "output.dep"
args = [streamsID, pointerFile, outputFile]
pluginHost.runPlugin("StreamLinkLength", args, False)

This is a Groovy script also using this tool:

def wd = pluginHost.getWorkingDirectory()
def streamsID = wd + "stream ID.dep"
def pointerFile = wd + "D8 pointer.dep"
def outputFile = wd + "output.dep"
String[] args = [streamsID, pointerFile, outputFile]
pluginHost.runPlugin("StreamLinkLength", args, false)

Credits: