Error in the radius of buffer
Fededgs opened this issue · 4 comments
Working with turf.buffer I notice that the buffering figure of a Polygon was not correct.
In particular, the radius (expressed in meter) wasn't respected during the dilatation.
I report below a test done for buffer a point.
(I know that there is turf.circle but i want to demonstrate the error for the radius).
point used -->"coordinates": [ 7.237860560417174, 45.12233909279541];
Code:
p = turf.buffer(point, 50, {units:'meters'});
console.log(turf.area(p));
Console:
3885.60
Check resultant area:
3885.60=* R² --> R=35.17m
So,the radius doesn't match the radius of the function.
(It was acceptable if the area was higher for the terrestrial curvature)
With other test, i find out that using radius=71.1 with 'meters', the area after buffer is 7857.98mq and R=50.01m with the formula used before.
Using turf@5.1.6
thanks
Bump. Having this same issue with miles. I generate a buffer from a point at say 50 miles, then it returns a buffer of only about 40 miles.
Ditto.
When I place a point at Paris CDG (49.0, 2.55) and generate a buffer with radius 188 Nautical Miles (distance from Paris CDG to London LHR), the buffer returned extends no further than the English channel.
The error gets less dramatic the closer to the equator I go, but even there there is still a small error.
How did you solve it in the end