Planar maps are fundamental structures in computational geometry. They are used to represent the subdivision of the plane into regions and have numerous applications. We describe the planar map package of CGAL--a Computational Geometry Algorithms Library. We discuss its modular design and implementation. In particular we introduce the two main classes of the design--planar maps and topological maps that enable the convenient separation between geometry and topology. The modular design is implemented using a generic programming approach. By switching a template parameter--the geometric traits class, one can use the same code for planar maps of different objects such as line segments or circular arcs. More flexibility is achieved by choosing a point location algorithm out of three implemented algorithms or plugging in an algorithm implemented by the user. The user of the planar maps package can benefit both from its flexibility and robustness. We present several examples of geometric traits classes and point location algorithms which demonstrate the possibility to adapt the general package to specific needs.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.