This tool will identify the catchment areas to each link in a user-specified stream network, i.e. the network's sub-basins. The user must specify the name of a flow pointer (flow direction) raster, a streams raster, and the output raster. The flow pointer and streams rasters should be generated using the D8 algorithm. The tool effectively performs a stream link ID operation followed by by a watershed operation.
Hillslopes are conceptually similar to sub-basins, except that sub-basins do not distinguish between the right-bank and left-bank catchment areas of stream links. The Sub-basins tool simply assigns a unique identifier to each stream link in a stream network.
NoData values in the input flow pointer raster are assigned NoData values in the output image. The output raster is of the float data type and categorical data scale.
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("Subbasins", 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("Subbasins", args, false)