-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add property projection
to support coordinates provided in EPSG:27700 and EPSG:3857
#168
Conversation
✅ Deploy Preview for oslmap ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
projection
to support coordinates provided in EPSG:27700projection
to support coordinates provided in EPSG:27700 and EPSG:3857
"+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 " + | ||
"+x_0=400000 +y_0=-100000 +ellps=airy " + | ||
"+datum=OSGB36 +units=m +no_defs" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also tried this alternate proj4 definition I found, but it put the marker for 233a Rotherhithe St about 1 block south-east (rather than 1 lot west, which is current error)
// https://epsg.io/27700
proj4.defs(
"EPSG:27700",
"+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 " +
"+x_0=400000 +y_0=-100000 +ellps=airy " +
"+nadgrids=OSTN15_NTv2_OSGBtoETRS.gsb " +
"+units=m +no_defs +type=crs"
);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +nadgrids=OSTN15_NTv2_OSGBtoETRS.gsb +units=m +no_defs +type=crs
is what's given by EPSG.io - https://epsg.io/27700.proj4
Netlify CI is expected to fail here on new commits because I've updated our site's build/deploy settings over here: #61 (unfortuantely it's a global setting, not per branch). Once that merges and this is rebased, I think it should be able to build again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
**Per our dev call chat, opening this for review since it's a useful feature for the map component, even though it doesn't fix the example address marker & Ordnance Survey bug described in the attached Trello card.
Previously, we've assumed all coordinate properties (eg
longitude
,latitude
,markerLongitude
,markerLatitude
) are provided in "EPSG:4326" (aka WGS84 / World Geodetic System).This PR introduces a
projection
property that defaults to "EPSG:4326" and additionally accepts "EPSG:27700" (aka OSGB 1936 / British National Grid) or "EPSG:3857" (aka WGS84 / Web Mercator). We assume that all coordinate properties are provided in the same projection.Coordinates provided in either projection will be translated to "EPSG:3857" to be rendered as a feature per openlayers & web mapping standards.
Example: