-
Notifications
You must be signed in to change notification settings - Fork 944
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
New module @turf/projection
#927
Conversation
👍 Nice! Looking forward to play with this module 😄 I'm good for using
Proj4 is perfect! I would've used the same. |
Significant recommendation, I would group these methods ( Or we use your 2nd approach, except change var projection = require('@turf/projection');
var pt = turf.point([4, 7.5])
var mercator = turf.projection(pt, 'wgs84', 'mercator');
var wgs84 = turf.projection(pt, 'mercator', 'wgs84'); |
This is what I really wanted to do, but I couldn't figure out how to do it, cause I didn't think about that!! 🎉 |
Awesome! 👍 Just need to look at |
- merged toMercator and toWgs84 to 2turf/projection; - added tests (180th meridian still fails); - updated readme and bench;
@DenisCarriere I am not sure how to handle the 180th meridian issue here: |
@turf/projection
🎉 @stebogit module published |
This is a first draft of the module(s) to convert any GeoJSON from WGS84 to Mercator and vice versa, where the conversion functions are taken from
sphericalmercator
.Example:
Do we actually want two separate modules for the conversions or a single one with a parameter?
We might have something like:
I decided to use
proj4
as a reference to create the test cases, is that ok?Ref: #141, #925