Skip to content

Flow Routing

Flow routing is the heart of hydrological analysis. It answers two questions, in order.

Where does each cell drain to? The answer is a flow pointer raster, which stores a direction for every cell.

How much land drains through each cell? The answer is a flow accumulation raster, which counts, for each cell, how many cells upstream eventually flow through it. Low values are hillsides, high values are channels. Thresholding that raster is how you extract a stream network.

Run these tools on a conditioned elevation model, not on a raw one. See Depressions & Storage for that step.

The tools come in matched pairs, one pointer and one accumulation, per algorithm. They differ in one respect: how much a cell is allowed to spread its water.

AlgorithmHow water movesUse it for
D8All of it to the single steepest of the eight neighbours.Channels, watersheds, anything that needs a clean single path. The default choice.
D infinitySplit between the two neighbours framing the true downhill direction.Sediment transport and hillslope processes, where D8’s eight fixed directions look artificial.
FD8Spread across every downhill neighbour, weighted by gradient.Diffusive processes, wetness indices, mass conservation on slopes.
Rho8One neighbour, chosen at random with a probability weighted by gradient.Running several times and averaging, to remove the striping D8 leaves on planar slopes.
MD infinity, Qin, QuinnVariants of multiple flow direction with different weighting rules.Reproducing a documented method, or comparing dispersal assumptions.

The practical rule: D8 for anything that must produce a network or a basin boundary, a dispersive method for anything that models a quantity spreading over a slope. D8 is also the only pointer that the watershed and stream tools accept.

The standard pair, and the input to most of the rest of the toolbox.

Run D8 Pointer on your conditioned DEM to get the direction raster. Then run D8 Flow Accum, which accepts either that pointer or the DEM directly.

Flow accumulation values span several orders of magnitude, since a channel gathers thousands of times more cells than a hilltop. A linear colour ramp shows almost nothing. Style the layer with a logarithmic scale, or by percentile, and the drainage network appears immediately.

The shortcut. It breaches the depressions, computes the pointer and computes the accumulation in one run, and returns all three rasters. Use it when you want the standard result quickly, and the separate tools when you need control over the conditioning.

Takes seed points and follows the flow path downhill from each, marking the route until it reaches an outlet or the edge of the raster. This is how you answer “if something spills here, where does it go”.

ToolWhat it does
D8 PointerSteepest descent direction among the eight neighbours.
D8 Flow AccumFlow accumulation following D8 directions, from a DEM or a D8 pointer.
D8 Mass FluxD8 accumulation of a load, with efficiency and absorption rasters. For modelling a substance rather than water.
Dinf PointerContinuous flow direction in radians, free of the eight direction bias.
Dinf Flow AccumFlow accumulation following D infinity directions.
Dinf Mass FluxD infinity accumulation of a load, with efficiency and absorption.
Fd8 PointerFractional flow to every downhill neighbour, weighted by gradient.
Fd8 Flow AccumFlow accumulation following FD8 directions.
Rho8 PointerSingle direction chosen stochastically, weighted by gradient.
Rho8 Flow AccumFlow accumulation following Rho8 directions.
Mdinf Flow AccumMultiple flow accumulation with gradient weighting. Outputs cell counts, catchment area or specific catchment area.
Qin Flow AccumulationQin multiple flow direction accumulation.
Quinn Flow AccumulationQuinn multiple flow direction accumulation.
Minimal Dispersion Flow AlgorithmMDFA direction and accumulation rasters, minimising artificial dispersal.
Flow Accum Full WorkflowBreaching, pointer and accumulation in one run, returning all three rasters.
Average Flowpath SlopeMean gradient of the flow paths passing through each cell.
Average Upslope Flowpath LengthMean length of the upslope paths reaching each cell.
Max Upslope Flowpath LengthLongest upslope path reaching each cell.
Max Upslope ValuePropagates the maximum upslope value of a raster along the flow paths.
Downslope Flowpath LengthDistance from each cell down to its outlet.
Flow Length DiffLocal differences in downslope path length, marking flow convergence.
Num Inflowing NeighboursHow many neighbours drain into each cell. Zero marks ridge lines.
Trace Downslope FlowpathsFollows the flow path downhill from seed points until an outlet or the raster edge.

Keep the pointer. The stream extraction and watershed tools take the pointer as input, not the DEM. Name it clearly when it lands on your map.

Edge effects. Cells whose upstream area extends past the edge of your raster have an underestimated accumulation. Edge Contamination, in Hydrologic Indices, maps exactly which cells are affected.

Where to go next. With an accumulation raster in hand, continue with Streams: network extraction or Watersheds & Basins.