The Boost.Polygon library provides algorithms focused on manipulating planar polygon geometry data.
The BOOST Polygon library uses C++-Concepts inspired template programming to provide generic library functions overloaded on concept type. There are currently thirteen concepts in the Polygon library type system. A concept object in the Polygon library is just an empty struct similar to a tag that would be used for tag dispatching.
The Boost.Polygon library provides algorithms focused on manipulating planar polygon geometry data. Specific algorithms provided are the polygon set operations (intersection, union, difference, disjoint-union) and related algorithms such as polygon connectivity graph extraction, offsetting and map-overlay. An example of the disjoint-union (XOR) of figure a and figure b is shown below in figure c. These so-called Boolean algorithms are of significant interest in GIS (Geospatial Information Systems), VLSI CAD as well all other fields of CAD, and many more application areas, and providing them is the primary focus of this library. The Boost.Polygon library is not intended to cover all of computational geometry in its scope, and provides a set of capabilities for working with coordinates, points, intervals and rectangles that are needed to support implementing and interacting with polygon data structures and algorithms.
More Reference Documentation can be found here