Skip to content
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

Correct earth radius value in @turf/helpers #978

Closed
stebogit opened this issue Sep 27, 2017 · 3 comments
Closed

Correct earth radius value in @turf/helpers #978

stebogit opened this issue Sep 27, 2017 · 3 comments

Comments

@stebogit
Copy link
Collaborator

stebogit commented Sep 27, 2017

@DenisCarriere @rowanwins I noticed @turf/helpers still uses an incorrect earth radius, and I don't know why exactly since it was decided to change it: #635 (comment), #645

I think we should modify it, knowing it will probably be very tricky because impacting a lot of modules.

I'd also suggest we add an earthRadius function (just returning 6371008.8, meters) in @turf/helpers so we can refer to it in all the modules that right now need that value (I see the Rhumb modules and @turf/buffer for example), or in future modules, to avoid mismatching.

@DenisCarriere
Copy link
Member

Yep agreed, we don't necessarily need a function, we just need to export variables like this library: https://github.com/mapbox/wgs84/blob/master/index.js

We should expose those 4 variables in turf helpers

@stebogit
Copy link
Collaborator Author

Oh cool, didn't know about exposing variables like this, but it makes sense. 👍

@stebogit
Copy link
Collaborator Author

Fixed with #980

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants