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
The isPointInPolygon() flags points that lie to the left of the polygon as point within the polygon in certain cases.
To Reproduce
Steps to reproduce the behavior:
Define a polygon with at least one vertical edge.
Check for any point that lies outside and to the left of the polygon such that its y coordinate takes any value that is within the maximum and minimum y values of the polygon vertices.
The isPointInPolygon() will return true.
This is because the slope of the vertical edge becomes positive or negative infinity and will result in the value of x coordinate of the point where the ray intercepts the edge to be NaN.
Expected behavior
The isPointInPolygon() should return false.
The text was updated successfully, but these errors were encountered:
Please check out my fork This might work for your use case.
Thank you so much! I've switched to using turf, in order to have future maintainability. They have a decent PIP library https://pub.dev/packages/turf_pip
Describe the bug
The isPointInPolygon() flags points that lie to the left of the polygon as point within the polygon in certain cases.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The isPointInPolygon() should return false.
The text was updated successfully, but these errors were encountered: