This tool can be used to calculate the distance from each grid cell in a raster to the nearest stream cell, measured along the downslope flowpath. The user must specify the name of a flow pointer grid derived using the D8 flow algorithm. This grid should be derived from a digital elevation model (DEM) that has been pre-processed to remove artifact topographic depressions and flat areas. The user must also provide a streams raster file. The stream raster should have been created using one of the DEM-based stream mapping methods, e.g. contributing area thresholding. Stream cells are designated in this raster as all non-zero values. The output of this tool, along with the Elevation Above Stream tool, can be useful for preliminary flood plain mapping when combined with high-accuracy DEM data.
The following is an example of a Python script that uses this tool:
wd = pluginHost.getWorkingDirectory()
pointerFile = wd + "D8 pointer.dep"
streamsFile = wd + "streams.dep"
outputFile = wd + "output.dep"
args = [pointerFile, streamsFile, outputFile]
pluginHost.runPlugin("DownslopeDistanceToStream", args, False)
This is a Groovy script also using this tool:
def wd = pluginHost.getWorkingDirectory()
def pointerFile = wd + "D8 pointer.dep"
def streamsFile = wd + "streams.dep"
def outputFile = wd + "output.dep"
String[] args = [pointerFile, streamsFile, outputFile]
pluginHost.runPlugin("DownslopeDistanceToStream", args, false)