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

Update earth radius #1012

Merged
merged 7 commits into from
Oct 11, 2017
Merged

Update earth radius #1012

merged 7 commits into from
Oct 11, 2017

Conversation

DenisCarriere
Copy link
Member

@DenisCarriere DenisCarriere commented Oct 11, 2017

Update earth radius

Modules modified:

  • @turf/buffer
  • @turf/point-on-line
  • @turf/distance
  • @turf/helpers

Main changes comes from @turf/helpers, the rest (278 files) are simply fixture updates.

/**
* Earth Radius used with the Harvesine formula and approximates using a spherical (non-ellipsoid) Earth.
*/
export var earthRadius = 6371008.8;
/**
* Unit of measurement factors using a spherical (non-ellipsoid) earth radius.
*/
export var factors = {
meters: earthRadius,
metres: earthRadius,
millimeters: earthRadius * 1000,
millimetres: earthRadius * 1000,
centimeters: earthRadius * 100,
centimetres: earthRadius * 100,
kilometers: earthRadius / 1000,
kilometres: earthRadius / 1000,
miles: earthRadius / 1609.344,
nauticalmiles: earthRadius / 1852,
inches: earthRadius * 39.370,
yards: earthRadius / 1.0936,
feet: earthRadius * 3.28084,
radians: 1,
degrees: earthRadius / 111325,
};

@Isaac-Leonard
Copy link

Does the assumption of earth being spherical and not ellipsoid have a major effect when not working near the poles?

@stebogit
Copy link
Collaborator

stebogit commented Jan 5, 2022

@Isaac-Leonard if the effect is "major" or significant - or not - depends on your specific use case and the dimensions of your features compared to the earth dimensions

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

Successfully merging this pull request may close these issues.

3 participants