Commit bfafd6f
authored
Add Dinf support to flow_accumulation() (#945)
flow_accumulation() only understood D8 integer codes. Passing Dinf
angles from flow_direction_dinf() silently produced wrong results
(every cell got 1.0) because float angles never matched any D8 code
in _code_to_offset.
Auto-detect D8 vs Dinf from input values, then run Tarboton's
proportional splitting for Dinf. All four backends covered: numpy,
cupy, dask+numpy, dask+cupy. 45 tests pass (24 existing D8 unchanged,
15 new Dinf, 6 detection).1 parent 837eab3 commit bfafd6f
File tree
2 files changed
+946
-25
lines changed- xrspatial
- tests
2 files changed
+946
-25
lines changed
0 commit comments