Doubt in Polygon Contains point #263
-
Hi @jmr ,
Even though the points lie outside the polygon, it returns that the point is contained within. (only for 1 point that lies close to the edge) These polygon coordinates are validated as legit vertices here https://geojsonlint.com/ Any clues on what is going wrong here? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
How do you know the point is outside? |
Beta Was this translation helpful? Give feedback.
How do you know the point is outside?
S2Polygon::Contains(S2Point)
is well exercised and unlikely to be wrong. It looks like your point is close to the boundary.S1Angle(point, polygon1.Project(point) ~ 0
.