Skip to content

Add D-infinity watershed and basin delineation #1016

@brendancol

Description

@brendancol

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 implementation
  • xrspatial/flow_accumulation_dinf.py -- angle decomposition into two neighbors with proportional weights

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions