This tool can be used to assign each link in a stream network a unique numeric identifier. This grid is used by a number of other stream network analysis tools. The user must specify the names of a streams raster image and D8 pointer image. The streams file is used to designate which grid cells contain a stream and the pointer image is used to traverse the stream network. Stream cells are designated in the streams image as all values greater than zero. Thus all non-stream or background grid cells are commonly assigned either zeros or NoData values. Background cells will be assigned the NoData value in the output image. The output raster is of an integer data type and categorical data scale. The pointer image should be created using the D8 algorithm.
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("StreamLinkID", 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("StreamLinkID", args, false)