export .osm with consistent precision
|Reported by:||Hamish <hamish_b@…>||Owned by:||team|
(copied to a new wish from #4445 comment 2)
when opening .osm files downloaded then exported using JOSM, Merkaartor, and Xapi I have noticed some differences that, when mixed, cause the Validator to fail to detect duplicate nodes. It's an ascii representation + floating point precision issue.
- JOSM seems to export with %.9g (~1cm)
- Merkaartor seems to save with %.8f (~1mm)
- Xapi seems to export with %.7f (~1cm)
I would argue that %.9g is no good for JOSM as it changes the positional precision only for longitude, based on if you are 100 degrees east or west of England. %g maintains overall number of numbers, not number of decimal places.
Latitude (which could plausibly accept reduced precision near the poles) is always <100 so except for by the equator (<10deg) is slightly more consistent. Longitude precision varies by 4 orders of magnitude depending on if you are <1 deg, <10 deg, or <100 deg.
I suggest for JOSM, Merkaartor, and Xapi to all agree on a single print format, and for that format to be %.8f (slightly beyond what survey grade RTK GPS will give you, but no more as to avoid cluttering everyone's disks with geo-noise).
I take it the back-end database is PostGIS storing coords as sql type DOUBLE PRECISION?
(fwiw JOSM r3208 also fails to open the downloaded Merkaartor 0.14 .osm file due to missing version= tags in nodes, but I guess that is a Merk bug)
Change History (6)
comment:4 in reply to: ↑ description Changed 3 years ago by bastiK
- Resolution set to invalid
- Status changed from new to closed