Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Circle radius is incorrect #321

Closed
zakjan opened this issue May 31, 2019 · 3 comments · Fixed by terraformer-js/terraformer#36
Closed

Circle radius is incorrect #321

zakjan opened this issue May 31, 2019 · 3 comments · Fixed by terraformer-js/terraformer#36

Comments

@zakjan
Copy link
Contributor

zakjan commented May 31, 2019

With increasing latitude from the equator, polygon generated by Terraformer.Circle uses smaller radius than it is in reality.

See this comparison with @turf/circle library of circles with 250km radius on latitudes 0, 10, 20, ...

Screenshot 2019-05-31 at 14 47 10

Turf - grey, Terraformer - blue

Please excuse my layman's description, I just compared the two libraries and Turf's output seems more correct by visual inspection.

@jgravois
Copy link
Collaborator

jgravois commented Jun 2, 2019

that definitely looks like a bug to me.

if you're interested in putting together a PR, I adapted a JS implementation of Vicenty's Formulae a couple years ago that you're welcome to steal.

Esri/geotrigger-editor#225

@zakjan
Copy link
Contributor Author

zakjan commented Jun 7, 2019

I have used another library meanwhile.

@jgravois
Copy link
Collaborator

jgravois commented May 17, 2020

fixed in @terraformer/spatial@2.0.5

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

Successfully merging a pull request may close this issue.

2 participants