Circle produces ellipsis (oval) geometry
See original GitHub issueimport circle from '@turf/circle';
then i create a circle:
let coords = [
55.837150763618574,
37.48126387596131,
];
let radius = 70; // in meters
let options = {
steps: 32,
units: 'kilometers',
};
let c = circle(coords, radius / 1000, options);
and if i use circle’s geometry coordinates to build a polygon and put in on some map:
console.log(c.geometry.coordinates)
it in fact looks like an ellipsis, not circle.
Issue Analytics
- State:
- Created 4 years ago
- Comments:19
Top Results From Across the Web
Overview concepts of ellipses and conic sections
An ellipse is a circle that has been stretched in one direction, to give it the shape of an oval. But not every...
Read more >How is an ellipse different from a circle?
In a circle, all points on the circle are equally far from the center of the circle. An ellipse is also a closed...
Read more >Circles and Ellipses | CK-12 Foundation
The ellipse has a geometric property relating to these points that is similar to a circle's relationship with its center. Remember a circle...
Read more >Difference Between Ellipse and Oval
Ellipses are conic sections with eccentricity (e) between 0 and 1 while ovals are not precisely defined geometrical figures in mathematics. • An ......
Read more >Ellipse - Simple English Wikipedia, the free encyclopedia
In geometry, an ellipse is a plane curve which results from the intersection of a cone by a plane in a way that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OK @artuska I found the issue. The data in Turf is definitely treated differently than in Leaflet (with all
LatLgn
stuff), the only common ground is GeoJSON.If you try
that works beautifully.
The
L.Polygon
function does not work like@turf/helpers|polygon
. You need to use theL.geoJSON
method on the GeoJSON output of Turf circle.Have you checked the projection system of your project? MapBox use EPSG 3857, this SR amplify the deformation in data as you move away from equator. Then given that Syria is nearest equator than Moscow you see there a circle and an ellipse in Moscow.