-
-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Labels
Description
After running intersection operation, result has had a negative area -9069.92444862902 which was calculated with turf.area. If you look at the result polygon you can see that second Polygon in MultiPolygon has the wrong position of the exterior ring.
https://codepen.io/ilijaz/pen/NLwvxN
turf.area(turf.polygon([inter.geometry.coordinates[1][0]]))
1023.8113326824149
turf.area(turf.polygon([inter.geometry.coordinates[1][1]]))
8.098257462853686
turf.area(turf.polygon([inter.geometry.coordinates[1][2]]))
9603.9065415225
So the standart says:
For Polygons with multiple LinearRings, the first must be the exterior ring and any others must be interior rings or holes.
Is it possible to sort rings in polygon after clipping?
PS. All works fine with QGIS and Leaflet.