dem_flow_accumulation — DEM hydrology op

• Data kinds: depth → image2d

• Call: import fullseye as fs; fs.ledger.dem_flow_accumulation(dem, cell_size, fill=True, epsilon=1e-06, nodata='error') (to call the implementation directly, import demops; demops.dem_flow_accumulation(dem, cell_size, fill=True, epsilon=1e-06, nodata='error'); from the registry, opsdem.get("dem_flow_accumulation"))

Usage

Number of contributing cells: the count of upstream cells flowing into each cell (the cell itself counts as 1).

With fill=True sinks are filled first (otherwise flow stops in sinks, and downstream accumulation comes out silently too small). Accumulation of missing cells is nan.

Graph construction is vectorised. However, the effect is small: at 1024x1024, 2.71 s -> 2.39 s. What dominates is not the construction but the subsequent topological sweep (a Python loop over all cells). To make it faster, that part would have to be rewritten —— stated explicitly so as not to leave a "thought it was fixed but it wasn't".

Detailed usage guide

• dem_terrain_analysis family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• dem_terrain_analysis_tour — py -3.11 examples/dem_terrain_analysis_tour.py

• poc_dem_terrain — py -3.11 examples/poc_dem_terrain.py

Ops the type connects to (they accept image2d as input)

—

Same category (hydrology)

dem_fill_sinks · dem_flow_direction · dem_stream_network


*Provenance: demops.py — DEM operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.