You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks, but unfortunately the turf.inside also does not seem to work for polygons crossing 180th meridian (and I'm pretty sure that it does not handle polygons containing pole as well).
E.g. in the sandbox you've entered you can try using polygon [[179, -1],[-179, -1],[-179, 1],[179, 1],[179, -1]], and for inclusion of points [179.5, 0.5], [-179.5, -0.5] I think they both should be considered to be inside the polygon.
Looking at pretty simple implementation (https://github.com/Turfjs/turf-inside/blob/master/index.js#L94 ) you can see that it only works if spherical polygons are very closely approximated by polygons in cartesian projection.
I'm not very eager to implement my own library for that, but probably I'll have to.
I'll submit an issue to turf-inside as well.
I don't know if the project is developed any more, but anyway:
If polygon contains pole pointInPolygon does not work.
I think that polygons crossing 180th meridian may also not work.
The text was updated successfully, but these errors were encountered: