Practical Point-in-Polygon Tests Using CSG Representations of Polygons
- Cite this paper as:
- Walker R.J., Snoeyink J. (1999) Practical Point-in-Polygon Tests Using CSG Representations of Polygons. In: Goodrich M.T., McGeoch C.C. (eds) Algorithm Engineering and Experimentation. ALENEX 1999. Lecture Notes in Computer Science, vol 1619. Springer, Berlin, Heidelberg
We investigate the use of a constructive solid geometry (CSG) representation in testing if a query point falls inside a polygon; in particular, we use a CSG tree whose leaves correspond to halfplanes defined by edges and whose internal nodes are intersections or unions of the regions defined by their subtrees. By preprocessing polygons into this representation, we obtain a linear-space data structure for point-in-polygon tests that has a tight inner loop that can prune unnecessary edge tests during evaluation. We experiment with opportunities to optimize the pruning by permuting children of nodes. The resulting test is less memory-intensive than grid methods and faster than existing one-shot methods. It also extends to ray-shooting in 3-space.
Unable to display preview. Download preview PDF.