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]: Shapefile export drops vertices with a missing coordinate without a notice #1687
I searched the existing issues and did not find a duplicate.
This is a bug report, not a usage question.
What happened?
A Shapefile export leaves out vertices whose coordinates are missing or infinite (NaN), and doesn't say so. The feature itself is written, so it isn't counted as left out either. A multipoint of four members, one of them NaN, comes out with three. Lines and polygons lose such vertices the same way, and a part or ring left with too few vertices goes too.
The code is the filter(finite) in shapefile_parts_in (crates/data/src/io.rs), for points, line parts and polygon rings.
Steps to reproduce
This uses mp.shp from the zip attached to #1552: one MultiPoint with three stations and one member whose x is NaN.
rustgis-cli run --data mp.shp --cmd 'share.exportLayer={"layer":"mp","path":"copy.shp"}'
The export reports "leftOut": 0 and no notice. copy.shp holds one multipoint of 3 points.
Expected behavior
A notice with a count, like the one for features left out, for example "1 vertex(es) with a coordinate missing or infinite left out of the Shapefile".
How are you running RustGIS?
Command line (rustgis-cli)
Version
Checked with a build of #1572's branch; the writer code is the same on main.
Activity
fix(data): a Shapefile export says which vertices it leaves out (#1687)…