pyflwdir.FlwdirRaster.stream_order#

FlwdirRaster.stream_order(type='strahler', mask=None)#

Returns the Strahler (default) or classic stream order map.

In the classic “bottum up” stream order map, the main river stem has order 1. Each tributary is given a number one greater than that of the river or stream into which they discharge.

In the strahler “top down” stream order map, rivers of the first order are the most upstream tributaries or head water cells. If two streams of the same order merge, the resulting stream has an order of one higher. If two rivers with different stream orders merge, the resulting stream is given the maximum of the two order.

Parameters:
  • type ({"strahler", "classic"}) – Stream order type. By default Strahler.

  • mask (2D array of boolean) – Mask of streams to consider. This can be used to compute the stream order for streams with a minimum upstream area or streams within a specific (sub)basin only.

Returns:

strahler order map

Return type:

2D array of int