fix: correctly set geojson writeFeaturesObject options for coordinates projected in EPSG:27700#261
Conversation
✅ Deploy Preview for oslmap ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
DafyddLlyr
left a comment
There was a problem hiding this comment.
One small question / comment!
| ? { | ||
| dataProjection: projection, | ||
| featureProjection: "EPSG:3857", | ||
| decimals: 0, |
There was a problem hiding this comment.
So this is a tricky one for me here.
decimals: 0 will (I think) give us a less accurate/meaningful GeoJSON, because BNG Eastings / Northings to 8 figures are accurate to 10m (https://digimap.edina.ac.uk/help/our-maps-and-data/bng/).
What I think we want to do is still output at the drawn accuracy (as well as OpenLayers can give us), but then just display in PlanX a rounded, consumable version?
There was a problem hiding this comment.
this is fair! while doing this, I did confirm that OS directly returns non-decimal BNG coordinates via OS Places and was loosely thinking it was okay to align to that, but I'm happy to keep full decimal accuracy for ourselves here and just display a rounded version later. updated now!
fixes bug spotted over here: theopensystemslab/planx-new#1377 (comment)
geojson change events now logging out "EPSG:27700" coordinates as proper 6-digit positive integers, "EPSG:3857" coordinates were always correct - and remain so!