Commit 187032a
committed
Add D-infinity flow length computation (#1012)
New flow_length_dinf() computes flow path lengths from D-inf angle
grids using Tarboton's two-neighbor angle decomposition. Downstream
mode gives the proportion-weighted distance to outlet; upstream mode
gives the longest path from any divide.
All four backends: NumPy, CuPy, Dask+NumPy, Dask+CuPy.
25 tests covering correctness, edge cases, and cross-backend consistency.
Also adds the missing flow_accumulation_dinf entry to the README
feature matrix.1 parent 0d1bdfb commit 187032a
File tree
5 files changed
+1256
-0
lines changed- docs/source/reference
- xrspatial
- tests
5 files changed
+1256
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
296 | 297 | | |
| 298 | + | |
| 299 | + | |
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
0 commit comments