Raster streams to vector

This tool converts a raster stream file into a vector shapefile. The user must specify 1) the name of the raster streams file, 2) the name of the D8 flow pointer file, and 3) the name of the output shapefile. Streams in the input raster streams file are denoted by cells containing any positive, non-zero integer. A field in the shapefile database file, called STRM_VAL, will correspond to this positive integer value. The database file will also have a field for the length of each link in the stream network. The flow pointer file must be calculated from a DEM with all topographic depressions and flat areas removed and must be calculated using the D8 flow pointer algorithm. The output shapefile will contain PolyLine features.

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 + "streams.shp"
args = [streamsFile, pointerFile, outputFile]
pluginHost.runPlugin("RasterStreamsToVector", 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 + "streams.shp"
Streams[] args = [streamsFile, pointerFile, outputFile]
pluginHost.runPlugin("RasterStreamsToVector", args, false)

Credits: