Skip to content

Add D-infinity flow path tracing #1014

@brendancol

Description

@brendancol

Summary

flow_path.py only supports D8 routing. There's no D-inf variant.

What's needed

A D-inf flow path tracer that follows the continuous angle from D-inf flow direction. At each cell, the angle points between two neighbor cells. Two options for tracing:

  1. Proportional split -- at each step, split the path into two branches weighted by the angle decomposition (same triangular facet logic used in flow_accumulation_dinf.py). Returns a tree of weighted paths.
  2. Dominant neighbor -- at each step, follow whichever of the two neighbors gets the larger weight. Returns a single path, simpler to implement.

Option 2 is probably the right starting point. Option 1 could be added later.

References

  • xrspatial/flow_path.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