Geo Fencing – point inside/outside polygon

If i remember correctly, the algorithm is to draw a horizontal line through your test point. Count how many lines of of the polygon you intersect to reach your point.

If the answer is odd, you’re inside. If the answer is even, you’re outside.

Edit: Yeah, what he said (Wikipedia):

alt text

Leave a Comment