Polygon: Get location of point...

Determines whether a given point is on the Inside, the Outside, on an Edge or on a Vertex of the selected Polygon.

Algorithm

We determine how often a horizontal line extending from the point crosses the polygon. If the number of crossings is even, the point is on the outside, else on the inside. Special care is taken to be able to detect if a point is on the boundary of the polygon. The used algorithm is from Hormann & Agathos (2001).


© djmw 20120220