[GRASS-git] [OSGeo/grass] 017db7: r.sim: Compute dx, dy internally to simplify workf...
Anna Petrasova
noreply at github.com
Wed Feb 4 07:35:41 PST 2026
Branch: refs/heads/main
Home: https://github.com/OSGeo/grass
Commit: 017db7e1df9b84130ca5b0549ecfed07a848daa8
https://github.com/OSGeo/grass/commit/017db7e1df9b84130ca5b0549ecfed07a848daa8
Author: Anna Petrasova <kratochanna at gmail.com>
Date: 2026-02-04 (Wed, 04 Feb 2026)
Changed paths:
M raster/r.sim/r.sim.sediment/main.c
M raster/r.sim/r.sim.sediment/r.sim.sediment.md
M raster/r.sim/r.sim.water/main.c
M raster/r.sim/r.sim.water/r.sim.water.md
M raster/r.sim/r.sim.water/testsuite/test_r_sim_water.py
A raster/r.sim/simlib/derivatives.c
M raster/r.sim/simlib/input.c
M raster/r.sim/simlib/simlib.h
Log Message:
-----------
r.sim: Compute dx, dy internally to simplify workflows (#6940)
Users need to provide elevation and dx and dy layers from r.slope.aspect. The new code computes dx and dy internally to simplify workflow. The algorithm and code is based on r.slope.aspect. It behaves the same way as r.slope.aspect's flags -a (Do not align the current region to the raster elevation map) and -e (Compute output at edges and near NULL values).
Tested in projections with feet. I did comparisons with dx and dy from r.slope.aspect and they are identical, however in r.sim.water they are computed as double precision while from r.slope.aspect they come as float and this difference seems to cause slight discrepancies in r.sim.water output, but very small ones. Test is testing against the currently used result by comparing difference with higher tolerance, but also computing a sum of differences manually to show the the overall difference is minimal.
The nulls from elevation input are now either transferred during computation of derivatives or, if dx and dy were provided, by explicit transfer (original code).
Both r.sim.water and r.sim.sediment have dx and dy which are now optional. Since dx and dy are optional, user can still provide them.
To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications
More information about the grass-commit
mailing list