This function can be used to calculate Horton's so-called laws of drainage network composition for a input stream network. The user must specify an input DEM (which has been suitably hydrologically pre-processed to remove any topographic depressions) and a raster stream network. The function will output a 4-element tuple containing the bifurcation ratio (Rb), the length ratio (Rl), the area ratio (Ra), and the slope ratio (Rs). These indices are related to drainage network geometry and are used in some geomorphological analysis. The calculation of the ratios is based on the method described by Knighton (1998) Fluvial Forms and Processes: A New Perspective.

## Code Example

`from whitebox_workflows import WbEnvironment`

## Set up the WbW environment

wbe = WbEnvironment() wbe.verbose = True wbe.working_directory = '/path/to/data'

## Read the inputs

dem = wbe.read_raster('DEM.tif') streams = wbe.read_raster('streams.tif')

## Calculate the Horton ratios

(bifurcation_ratio, length_ratio, area_ratio, slope_ratio) = wbe.horton_ratios(dem, streams)

## Outputs

print(f"Bifurcation ratio (Rb): {bifurcation_ratio:.3f}") print(f"Length ratio (Rl): {length_ratio:.3f}") print(f"Area ratio (Ra): {area_ratio:.3f}") print(f"Slope ratio (Rs): {slope_ratio:.3f}")

## See Also

horton_stream_order

## Function Signature

`def horton_ratios(self, dem: Raster, streams_raster: Raster) -> Tuple[float, float, float, float]: ...`

## Project Links

WbW Homepage User Manual Support WbW