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.

Algorithm How water moves Use it for
D8 All of it to the single steepest of the eight neighbours. Channels, watersheds, anything that needs a clean single path. The default choice.
D infinity Split between the two neighbours framing the true downhill direction. Sediment transport and hillslope processes, where D8’s eight fixed directions look artificial.
FD8 Spread across every downhill neighbour, weighted by gradient. Diffusive processes, wetness indices, mass conservation on slopes.
Rho8 One 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, Quinn Variants 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”.

Tool What it does
D8 Pointer Steepest descent direction among the eight neighbours.
D8 Flow Accum Flow accumulation following D8 directions, from a DEM or a D8 pointer.
D8 Mass Flux D8 accumulation of a load, with efficiency and absorption rasters. For modelling a substance rather than water.
Dinf Pointer Continuous flow direction in radians, free of the eight direction bias.
Dinf Flow Accum Flow accumulation following D infinity directions.
Dinf Mass Flux D infinity accumulation of a load, with efficiency and absorption.
Fd8 Pointer Fractional flow to every downhill neighbour, weighted by gradient.
Fd8 Flow Accum Flow accumulation following FD8 directions.
Rho8 Pointer Single direction chosen stochastically, weighted by gradient.
Rho8 Flow Accum Flow accumulation following Rho8 directions.
Mdinf Flow Accum Multiple flow accumulation with gradient weighting. Outputs cell counts, catchment area or specific catchment area.
Qin Flow Accumulation Qin multiple flow direction accumulation.
Quinn Flow Accumulation Quinn multiple flow direction accumulation.
Minimal Dispersion Flow Algorithm MDFA direction and accumulation rasters, minimising artificial dispersal.
Flow Accum Full Workflow Breaching, pointer and accumulation in one run, returning all three rasters.
Average Flowpath Slope Mean gradient of the flow paths passing through each cell.
Average Upslope Flowpath Length Mean length of the upslope paths reaching each cell.
Max Upslope Flowpath Length Longest upslope path reaching each cell.
Max Upslope Value Propagates the maximum upslope value of a raster along the flow paths.
Downslope Flowpath Length Distance from each cell down to its outlet.
Flow Length Diff Local differences in downslope path length, marking flow convergence.
Num Inflowing Neighbours How many neighbours drain into each cell. Zero marks ridge lines.
Trace Downslope Flowpaths Follows 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.