[GRASS-git] [OSGeo/grass] c63086: r.sim: Refuse to run in latitude-longitude project...
Vaclav Petras
noreply at github.com
Wed Sep 30 16:54:43 PDT 2026
Branch: refs/heads/main
Home: https://github.com/OSGeo/grass
Commit: c63086578a962a6166ed505d8cb92569ed00afdb
https://github.com/OSGeo/grass/commit/c63086578a962a6166ed505d8cb92569ed00afdb
Author: Vaclav Petras <wenzeslaus at gmail.com>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M raster/r.sim/r.sim.sediment/main.c
M raster/r.sim/r.sim.sediment/r.sim.sediment.html
M raster/r.sim/r.sim.sediment/r.sim.sediment.md
A raster/r.sim/r.sim.sediment/tests/r_sim_sediment_latlong_test.py
M raster/r.sim/r.sim.water/main.c
M raster/r.sim/r.sim.water/r.sim.water.html
M raster/r.sim/r.sim.water/r.sim.water.md
A raster/r.sim/r.sim.water/tests/r_sim_water_latlong_test.py
Log Message:
-----------
r.sim: Refuse to run in latitude-longitude projects (#7978)
r.sim.water and r.sim.sediment convert the cell size to meters with
G_database_units_to_meters_factor(), but the slope is computed from the
cell size in project units. In a latitude-longitude project the factor
is 1, so one degree was taken as one meter without any warning, and the
results were meaningless. A run in EPSG:4326 at 1 degree resolution gave
the same output as a run in an XY project at 1 m.
Both tools now end with an error in a latitude-longitude project right
after parsing, before reading any input, and ask the user to reproject
the data to a projected coordinate system. The error message follows
the one used by r.topidx, r.gwflow, and r.solute.transport. The
documentation of both tools states the requirement.
There are no output changes in projected or XY projects.
Written with the help of Claude Code.
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