Closed MuhammadTaha closed 5 years ago
We’re not going to change the expected orientation of this method. If you are using spherical coordinates, you should probably be using d3.geoContains instead of d3-polygon. If you’re using planar (e.g., projected) coordinates that have the y-axis flipped, then you can negate the return value of d3.polygonContains or reverse the coordinates to get the desired behavior.
I am working on geo coordinates and needed to check if the point is inside the polygon, what i found is an issue whenever the condition is met the inside flag is flipped in my case it is always showing me false.
https://github.com/d3/d3-polygon/blob/master/src/contains.js#L11
Shouldn't it be like if it matches once it should be considered inside.