Watershed Delineator
Choose a DEM cell or WGS84 longitude/latitude outlet. Each valid cell flows toward the steepest of its eight lower neighbours, using approximate Earth-surface distances. Optionally fill local depressions from the raster edge with a deterministic priority flood and route equal-height flats toward an earlier flood parent. Trace upstream cells and the longest modelled route without sending the DEM to a server.
Key features
- Read one numeric-band north-up GeoTIFF with explicit EPSG:4326 or EPSG:3857 and NoData
- Compare original strict-descent sinks with priority-flood filled, deterministic flat routes
- Trace the outlet's upstream cell mask and longest connected D8 main-stem path
- Estimate basin surface area by spherical row-cell areas and report filled cells, sinks and NoData
- Export a re-read GeoTIFF mask (0 outside, 1 basin, 255 source NoData), WGS84 GeoJSON row-run polygons, SVG and cell CSV
- Reject invalid/multi-band/rotated DEMs, out-of-grid or NoData outlets and over-limit files
How to use
- Choose a local one-band DEM GeoTIFF, or load the 5×5 example, and inspect its CRS, bounds and NoData.
- Enter a zero-based outlet pixel or WGS84 longitude/latitude; the preview also lets you pick a pixel.
- Choose original strict descent or priority-flood depression filling.
- Run D8 delineation and inspect the basin mask, main route, area and sink diagnostics.
- Download GeoTIFF, GeoJSON, SVG or CSV, and verify assumptions before using another GIS workflow.
Use cases
- Teach how a chosen outlet changes the upstream catchment on a small DEM
- Compare raw closed pits with a filled surface and deterministic flat routing
- Inspect NoData barriers and a raster-edge outlet before further GIS analysis
Frequently asked questions
Is this the same as a terrain viewshed?
No. A viewshed tests straight sight lines from an observer against terrain; this tool links each DEM cell to one downhill D8 neighbour and follows upstream cells to an outlet.
What happens to pits and flat cells?
Original mode only follows strictly lower neighbours, leaving closed pits and equal-height flats as sinks. Fill mode raises depressions to edge spill levels with a priority flood, then points unresolved equal-height cells to an earlier adjacent flood parent. It never treats NoData as a drain.
How is area calculated?
The tool sums spherical surface area of each included raster row cell using Earth mean radius 6,371,008.8 m. It is approximate, even for EPSG:3857, and not the projected square-metre area or a surveyed parcel measurement.
What does the exported mask contain?
A new one-band north-up GeoTIFF keeps the source grid, EPSG code and extent. Code 1 is upstream basin, 0 is valid terrain outside it and 255 is source NoData. Original elevations and non-spatial TIFF metadata are not copied.
Can I use this for drainage engineering decisions?
No. D8 single-flow routing, coarse input cells, edge/NoData assumptions, filled pits and spherical area omit rainfall, infiltration, culverts and surveyed terrain. Validate with qualified hydrology and GIS methods before design.
How large a DEM is supported?
The browser accepts up to 8 MiB, 120,000 cells and 1,024 cells on either side in a single north-up one-band GeoTIFF. Only explicit EPSG:4326/3857 are supported; rotated, arbitrary CRS and multi-image files are rejected.
Privacy
The selected DEM is decoded, modelled and exported in this browser tab. This tool does not upload DEM bytes or coordinates to its server API.
Comments & questions