D8 Distance To Streams

Title  D8 Distance To Streams

Summary

Computes the horizontal distance to stream for each grid cell, moving downslope according to the D8 flow model, until a stream grid cell is encountered.


Usage

Command Prompt Syntax:

mpiexec -n <number of processes> D8HDistTostrm -p <pfile> -src <srcfile> -dist <distfile> [ -thresh]

pfile: D8 flow direction input file

srcfile: stream channel definition input file

distfile: distance to stream channel output file

thresh: integer value used to define channels in srcfile


Syntax

D8DistanceToStreams (Input_D8_Flow_Direction_Grid, Input_Stream_Raster_Grid, Threshold, Input_Number_of_Processes, Output_Distance_to_Streams_Grid)

Parameter Explanation Data Type
Input_D8_Flow_Direction_Grid Dialog Reference

This input is a grid of flow directions that are encoded using the D8 method where all flow from a cells goes to a single neighboring cell in the direction of steepest descent.

Raster Layer
Input_Stream_Raster_Grid Dialog Reference

A grid indicating streams. Such a grid can be created by several of the tools in the "Stream Network Analysis" toolset. However, the tools in the "Stream Network Raster" toolset only create grids with a value of 0 for no stream, or 1 for stream cells. This tool can also accept grids with values greater than 1, which can be used in conjunction with the Threshold parameter to determine the location of streams. This allows Contributing Area grids to be used to define streams as well as the normal Stream Raster grids. This grid expects integer (long integer) values and any non-integer values will be truncated to an integer before being evaluated.

Raster Layer
Threshold Dialog Reference

This value acts as threshold on the Stream Raster Grid to determine the location of streams. Cells with a Stream Raster Grid value greater than or equal to the Threshold value are interpreted as streams. If not specified the Threshold to define streams defaults to 1.

Double
Input_Number_of_Processes Dialog Reference

This input indicates the number of stripes that the domain will be divided into and the number of MPI parallel processes that will be spawned to evaluate each piece of the domain.

Long
Output_Distance_to_Streams_Grid Dialog Reference

A grid giving the horizontal distance along the flow path as defined by the D8 Flow Directions Grid to the streams in the Stream Raster Grid.

Raster Dataset

Code Samples

Tags

Credits

Use limitations