You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: A mobile map package and a layout's globe locator simplify geometry without saying what they leave or move #1811
I searched the existing issues and did not find a duplicate.
This is a bug report, not a usage question.
What happened?
Two commands simplify geometry through rustgis_analysis::simplify_geometry and never say what that did to it:
map.package with "mobile": true (crates/engine/src/cmd/items.rs, package_map) simplifies every vector layer's geometry before packaging it.
A layout's globe locator (crates/engine/src/cmd/layout.rs) simplifies the polygons it draws on the disc.
Neither reports anything Simplify itself reports (or, with #1808, will report): a latitude past ±90° moved to the pole, a line or polygon left unsimplified because a coordinate is missing (NaN) or a longitude is too far out for the analysis plane, a line part of one vertex dropped, a feature too intricate to simplify whole within the work allowed. For the package, that changes the data people take into the field with no word about it.
Steps to reproduce
Make a line layer with one vertex at latitude 95° (bad data, but files have it), for example a GeoJSON LineString [[0, 80], [1, 95], [2, 80]].
Package the map for mobile: rustgis-cli run --data bad.geojson --cmd 'map.package={"path": "out.rgismpk", "mobile": true}'
Reading the file warns "1 feature has a latitude past ±90°: longitude and latitude may be swapped", which is right. Then open the package's Map.rgismap: the vertex is at 90°. Packaging moved it to the pole and said nothing about that. A package without "mobile" keeps it at 95°, so it's the simplifying that moves it.
The same layer through the Simplify tool says "1 vertex(es) with a latitude past a pole found (taken as that pole)" (with #1808).
Expected behavior
The mobile package and the locator say what Simplify says, one notice per kind with a count, through Session::notify. A clean layer says nothing.
My plan would be to have simplify_geometry return what it left alone, as the tool's simplify_checked does in #1808, and have both callers report it. That waits for #1808.
Activity
fix(engine): Simplify's callers also say what it left unsimplified, as …
fix(engine): the mobile map package and the globe locator say what si…