This guide explains how a watershed is delineated from a digital elevation model (DEM), which free tools do it well, and where delineations usually go wrong. GeoPilot has no watershed delineation tool of its own; the last two sections say what it does offer around a watershed.
What is watershed delineation?
Watershed delineation is drawing the boundary of all the land that drains to one point on a stream, called the outlet or pour point. The same area is called a catchment or a drainage basin. From a DEM, the boundary is found by working out which way water flows from every cell and collecting every cell whose flow path reaches the outlet. The result is the basis for runoff estimates, water balance studies, pollution source tracking and hydrological model setup.
Which DEM should you use?
Use the best terrain model that covers the whole basin, with some margin. A basin that runs off the edge of the DEM is cut short, and nothing in the result tells you so. For large basins, the free Copernicus DEM GLO-30 (30 m) is a common choice. It is a surface model that includes buildings and vegetation, which can move small boundaries in towns and forests. National LiDAR-derived terrain models are better for small catchments. In the United States, USGS StreamStats delineates the basin for a point you pick, from 3D Elevation Program data, and returns basin characteristics and regression-based flow statistics.
Work in a projected coordinate system with cells in metres, so that areas, slopes and thresholds mean what you think they mean.
How do you delineate a watershed, step by step?
1. Condition the DEM
Remove the pits and depressions that would trap flow. Filling raises the cells in a depression to its spill level. Breaching cuts a channel through the barrier instead, which suits DEMs where a road embankment or a bridge deck blocks a valley. Lindsay (2016, Hydrological Processes 30, 846-857) points to research showing that filling has a large impact on a DEM, and presents a hybrid breaching method fast enough for very large DEMs.
2. Compute flow direction
The D8 method sends all of a cell's flow to the steepest of its eight neighbours (O'Callaghan and Mark 1984, Computer Vision, Graphics, and Image Processing 28, 323-344). Tarboton's D-infinity method splits flow between two downslope cells according to the direction of steepest slope (Water Resources Research 33, 309-319, 1997). It is used for contributing area on hillslopes, while boundary tools usually take a D8 grid: the WhiteboxTools Watershed tool, for example, requires one.
3. Accumulate flow and extract streams
Flow accumulation counts the cells upstream of each cell. Cells above a threshold become the stream network. You choose the threshold. A low one gives a dense network of small channels, a high one only the main rivers. Compare the extracted streams with a map or imagery and adjust.
4. Place and snap the outlet
The outlet has to sit exactly on a DEM-derived stream cell. A point digitized from a map is usually a cell or two off, and the WhiteboxTools watershed documentation warns that a pour point off the main flow path, even by one cell, can give a very different catchment area. Snap outlets to the highest-accumulation cell within a short distance, or to the extracted streams.
5. Delineate and check
Trace every cell that drains to the outlet, convert the result to a polygon, and compute its area. Then check it before using it:
- Compare the area with a published figure. Stream gauging agencies usually report the drainage area of each gauge, and a delineated area far from it means the outlet or the DEM is wrong.
- Lay the extracted streams over a topographic map or imagery. The main channels should line up, and no mapped river should cross the boundary.
- Look at the outline. Long straight edges often follow the DEM edge or a no-data gap, and a thin finger running out of the basin often follows a road cutting or a canal.
If two methods are available, for example r.watershed and WhiteboxTools, run both. Where they disagree, the terrain is ambiguous and needs a closer look.
Which tools delineate watersheds?
| Tool | How you use it | Licence |
|---|---|---|
| GRASS GIS r.watershed and r.water.outlet | GRASS on its own or from QGIS Processing | GPL |
| WhiteboxTools | Command line, Python, R or a QGIS plugin | MIT |
| TauDEM | Command line, with MPI for parallel runs on large DEMs | GPL v3 |
| pysheds | Python | GPL-3.0 |
| USGS StreamStats | Web map, United States only | Free public service |
r.watershed computes flow accumulation, drainage direction, streams and basins in one run. Its manual says the DEM does not need to be sink-filled, because it uses a least-cost (AT) search, though gaps of no data inside the area should be filled first. It uses multiple flow direction by default, with a flag for single flow direction. r.water.outlet then generates the basin from the drainage direction map and an outlet coordinate.
In WhiteboxTools the usual chain is BreachDepressionsLeastCost, D8Pointer, D8FlowAccumulation, ExtractStreams, JensonSnapPourPoints and Watershed. The Watershed tool needs a D8 pointer grid and point outlets; the Basins tool instead finds every basin draining to the DEM edge.
TauDEM, from David Tarboton's group at Utah State University, delineates watersheds and subwatersheds draining to each stream segment, which suits setting up distributed hydrological models. pysheds delineates the catchment for a pour point in a few lines of Python.
Can you skip delineation and download basin boundaries?
Often, yes. HydroBASINS provides global sub-basin polygons in 12 nested levels, derived from HydroSHEDS at 15 arc-second resolution, and is free for scientific, educational and commercial use. Many countries also publish their own official catchment boundaries. A downloaded boundary will not end exactly at your outlet, so for a specific gauge or intake you still need to delineate, but for regional work it can save the whole job.
Where do watershed delineations go wrong?
- The outlet is not snapped, giving a tiny basin or the wrong tributary.
- The DEM stops short of the true divide, so the basin is cut off at the edge.
- Flat land, such as deltas and irrigated plains, has no clear flow direction, and canals move water across natural divides. StreamStats' own notes say DEM delineation is especially error-prone in flat areas.
- Embankments without culverts in the DEM dam the valley, and filling then creates a false lake.
- Karst and urban drainage send water underground or into pipes the DEM cannot see.
What can GeoPilot do around a watershed?
GeoPilot has no watershed delineation tool. It is useful once you have a boundary, from one of the tools above or from HydroBASINS. Upload it as a zipped shapefile, GeoJSON or GeoPackage (under 50 MB; clip a continental file to your region first), and then ask questions like:
- "What is the area of this watershed in square kilometres?"
- "Fetch the waterways and land use inside the watershed from OpenStreetMap and summarise land use area by type."
- "Count the buildings in each sub-basin and colour the sub-basins by building count."
- "Make an IDW surface of annual rainfall from the gauge points, draw 100 mm contour lines, and clip them to the watershed."
- "Download the Copernicus DEM for the watershed's extent and map HAND flood depth zones for a 3 m stage rise."
The last request uses GeoPilot's flood screen, which conditions the DEM and routes flow internally to compute height above nearest drainage. It returns flood depth zones only; the flood risk mapping guide explains the method. For urban storm drainage, our DrainPilot catchment tool delineates the subcatchments that drain to each inlet of a SWMM model from a DEM, which is a different job from delineating a river basin. More on water work in GeoPilot is on the water and hydrology page.
What GeoPilot does not do here
GeoPilot does not delineate watersheds or sub-basins, extract stream networks, assign Strahler orders, output flow direction or flow accumulation grids, find the longest flow path, or draw elevation profiles. Its terrain tools do not run on a DEM you upload; an uploaded GeoTIFF is shown on the map but not analysed. For delineation itself, use QGIS with GRASS or WhiteboxTools, TauDEM, pysheds or StreamStats, and bring the boundary into GeoPilot for the analysis that follows.
Jagadeesh Gaddam
CEO, Smart Bhujal
Try this in GeoPilot
Run the analysis described in this article with one prompt. No setup required.
Open GeoPilot
