Esri/terraformer

Circle radius is incorrect

zakjan opened this issue · 3 comments

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.

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

I have used another library meanwhile.

fixed in @terraformer/spatial@2.0.5