geoprimsField-grade geospatial math

Stream network and Strahler order

The channels in an elevation grid: the cells where enough ground drains through, split into links, each with its Strahler order, its length, and the area draining through its outlet.

Experimental: not yet fully verified. How results are checked

2

The network reaches Strahler order 2.

Links by order
Strahler orderLinks of this orderTheir length in all
12169.71 m
21120.00 m
The links
LinkStrahler orderLengthDrainage area at its outletCells
1184.85 m17,100.0 m23
2184.85 m17,100.0 m23
32120.00 m27,900.0 m25
Link vertices
LinkDistance eastDistance south
145.000 m15.000 m
175.000 m45.000 m
1105.000 m75.000 m
2165.000 m15.000 m
2135.000 m45.000 m
2105.000 m75.000 m
3105.000 m75.000 m
3105.000 m105.000 m
3105.000 m135.000 m
3105.000 m165.000 m
3105.000 m195.000 m
Links
Channel cells
Network length
Threshold used
Most cells draining through one cell
Provenance
Computed by
raster.hydrology.streams 1.0.0, core 0.1.0
Model
Channel cells are those whose D8 accumulation reaches the threshold. Strahler (1957): a channel cell with no channel cell draining into it is order 1; where channels meet, two of the same order make the next order and a lower one leaves the order alone. A link runs from a source or a junction down to the next junction or the network's outlet; its length adds the cell size along sides and √2 times it along diagonals, and its outlet area is the accumulation at its last cell times the cell area
Accuracy
Exact in the arithmetic of the rules: the order follows Strahler's definition cell by cell, and the length is the walked path of cell centers
Notes
1 shown with the answer
Cites
O'Callaghan, J. F., and Mark, D. M., Computer Vision, Graphics, and Image Processing, The extraction of drainage networks from digital elevation data; Strahler, A. N., Transactions, American Geophysical Union, Quantitative analysis of watershed geomorphology

Something look off?

Your values

Showing an example. Change anything.
More options 3
Run many at once from a CSV

Loading…

3 links, highest order 29 channel cells · 289.71 mThicker is higher order
How we got thisFormula, worked example, sources, and proof

Model: Channel cells are those whose D8 accumulation reaches the threshold. Strahler (1957): a channel cell with no channel cell draining into it is order 1; where channels meet, two of the same order make the next order and a lower one leaves the order alone. A link runs from a source or a junction down to the next junction or the network's outlet; its length adds the cell size along sides and √2 times it along diagonals, and its outlet area is the accumulation at its last cell times the cell area

Show your work

  1. Channel cells

    cells whose accumulation reaches the threshold

    threshold 3 cells of 49 = 9 cells

  2. Strahler order

    two channels of one order make the next; a lower one leaves it alone

    3 links = 2

The same steps an agent gets from the MCP server with explain: true.

Accuracy: Exact in the arithmetic of the rules: the order follows Strahler's definition cell by cell, and the length is the walked path of cell centers

When to use this: Use this to pull the channels out of a conditioned DEM and see how the network branches: which stretches are headwaters, which are the main stem, how long each is, and how much ground drains through its outlet. Set the threshold by how much upslope area makes a channel in your landscape, as cells or as an area; raise it for fewer, longer streams.

Limitations: The threshold is the whole model of what a channel is: there is no rule here for picking it, and a different threshold gives a different network. Links are the cells themselves, so a length is the walked path of cell centers and reads longer than a smooth channel, especially where the path staircases. The window is all the tool knows, so a stream entering from outside starts at the edge. An unconditioned pit ends a channel in the middle of the grid; condition the grid first. The window holds at most 25,000 cells.

Worked example: Two headwaters joining into one stream. Source: add-raster-hydrology raster/hydrology, the Order rule scenario: two first-order links join into a second-order link.

You enter

Cell size
30 m
Elevation grid
60, 48, 60, 60, 60, 48, 60 60, 60, 47, 60, 47, 60, 60 60, 60, 60, 46, 60, 60, 60 60, 60, 60, 45, 60, 60, 60 60, 60, 60, 44, 60, 60, 60 60, 60, 60, 43, 60, 60, 60 60, 60, 60, 42, 60, 60, 60
Threshold, in cells
3

You get

Highest order
2
Links
3
Channel cells
9
Network length
289.71 m
Threshold used
3
Most cells draining through one cell
31

Review: Not yet independently reviewed by a GIS professional.

Last verified: 2026-11-06, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.

Status: version 1.0.0, core 0.1.0. See this tool in the verification report.

Changes

Checked against: 20 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Sources

Experimental means this tool has not yet met the stable bar: at least 20 golden vectors, differential tests, and an independent worked example.