-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
watershed.py only works with D8 flow direction. There's no D-inf variant for watershed or basin delineation.
What's needed
D-inf watershed delineation using reverse tracing from pour points. With D-inf routing, each cell drains to two neighbors weighted by the continuous angle. A cell belongs to a watershed if any of its two downstream neighbors (per the angle decomposition) eventually reach the pour point.
The reverse trace needs to check both possible downstream cells and their weights. Cells where neither downstream path reaches the pour point are excluded.
D-inf watersheds will generally look similar to D8 watersheds but with smoother boundaries, since the continuous angle avoids the grid-alignment artifacts of 8-direction routing.
References
xrspatial/watershed.py-- existing D8 implementationxrspatial/flow_accumulation_dinf.py-- angle decomposition into two neighbors with proportional weights
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request