Skip to content

Commit bcb9c17

Browse files
committed
Add MFD flow length computation (#1009)
New flow_length_mfd() computes proportion-weighted flow path lengths from MFD fraction grids. Downstream mode gives the expected distance to outlet weighted by MFD fractions; upstream mode gives the longest path from any divide to each cell. All four backends: NumPy, CuPy, Dask+NumPy, Dask+CuPy. 29 tests covering correctness, edge cases, and cross-backend consistency.
1 parent 0d1bdfb commit bcb9c17

3 files changed

Lines changed: 1402 additions & 0 deletions

File tree

xrspatial/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
from xrspatial.flow_direction_dinf import flow_direction_dinf # noqa
4646
from xrspatial.flow_direction_mfd import flow_direction_mfd # noqa
4747
from xrspatial.flow_length import flow_length # noqa
48+
from xrspatial.flow_length_mfd import flow_length_mfd # noqa
4849
from xrspatial.flow_path import flow_path # noqa
4950
from xrspatial.focal import mean # noqa
5051
from xrspatial.glcm import glcm_texture # noqa

0 commit comments

Comments
 (0)