TopoToolbox / TopoToolbox/libtopotoolbox
Deprecate `flow_accumulation` and `drainagebasins`
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
These can both be accomplished efficiently using flow algebras (currently in src/streamquad.c:
flow_accumulationistraverse_down_{f32, f64}_add_muldrainagebasinsispropagatevaluesupstream_i64ortraverse_up_u32_or_and
This removes some internal duplication and reduces the surface area of the libtopotoolbox API.
These functions will need to be removed from their uses in pytopotoolbox, topotoolbox3 and topotoolboxr before being removed from libtopotoolbox.
See #164, #211, TopoToolbox/pytopotoolbox#367 for more discussion about this change and https://github.com/TopoToolbox/libtopotoolbox/pull/210#pullrequestreview-3840785177 for more discussion about this design.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/streamquad.c by reading the named flow-algebra functions and the implementations of flow_accumulation and drainagebasins. Then trace and remove their uses in pytopotoolbox, topotoolbox3, and topotoolboxr before removing them from libtopotoolbox. Done means the downstream uses are removed and the duplicated library API functions can be deleted, consistent with the discussions in #164, #211, and pytopotoolbox#367.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100