Closed Biaggio74 closed 4 years ago
Hmmm... that does sound like a lot more. I'm not surprised that it could be more since it's not a circle but a convex hexagon, but twice does seem like a lot. let me look into this.
Wait a moment, why are you dividing the area by 2? The area of a circle is radius * radius * Math.PI
not radius * radius * Math.PI / 2
.
You say that turf returns 8091097.936206874
while the radius * raduis * Math.PI
is 8143322.317370103
.
8143322.317370103/8091097.936206874 = 1.0%
. This does not seem like a big difference to me.
@johachi you are right, my mistake, I confused myself with diameters and division by 4, etc. ...I'm sorry. ...Sure, that 1% is very reasonable for the polygon and circle area differences.
Perfect! I'm now closing this issue :)
I am getting incorrect areas of the polygons, thus probably wrong coordinates as well. I can demonstrate the result and reproduce the error by using the Turfjs library. Beside this, I have got same result while working with Google Earth engine. (...the number of pixels showed similar deviation and magnitude of error in an image classification within this computed polygon)
Result:
I understand that the polygon shape has a different area than a perfect circle, but the error shows approx. double area than a mathematically computed one.