Skip to content

Error in the radius of buffer #38

Description

@Fededgs

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=image* 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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions