This tool can be used to measure the average slope gradient, in degrees, of each link in a raster stream network. To estimate the slope of individual grid cells in a raster stream network, use the stream_slope_continuous tool instead. The user must input a stream link identifier raster image (streams_id_raster
), a D8 pointer image (d8_pointer), and a digital elevation model (dem
). The pointer image is used to traverse the stream network and must only be created using the D8 algorithm (d8_pointer). 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, unless zero_background=True
, in which case non-stream cells will be assigned zero values in the output.
By default, the pointer raster is assumed to use the clockwise indexing method used by WhiteboxTools. If the pointer file contains ESRI flow direction values instead, set esri_pointer=True
.
stream_slope_continuous, d8_pointer
def stream_link_slope(self, d8_pointer: Raster, streams_id_raster: Raster, dem: Raster, esri_pointer: bool = False, zero_background: bool = False) -> Raster: ...