Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.


Boost.Geometry (aka Generic Geometry Library, GGL), part of collection of the Boost C++ Libraries, defines concepts, primitives and algorithms for solving geometry problems.

Boost.Geometry contains a dimension-agnostic, coordinate-system-agnostic and scalable kernel, based on concepts, meta-functions and tag dispatching. On top of that kernel, algorithms are built: area, length, perimeter, centroid, convex hull, intersection (clipping), within (point in polygon), distance, envelope (bounding box), simplify, transform, and much more. The library supports high precision arithmetic numbers, such as ttmath.

Boost.Geometry contains instantiable geometry classes, but library users can also use their own. Using registration macros or traits classes their geometries can be adapted to fulfil Boost.Geometry concepts.

Boost.Geometry might be used in all domains where geometry plays a role: mapping and GIS, game development, computer graphics and widgets, robotics, astronomy and more. The core is designed to be as generic as possible and support those domains. For now, the development has been mostly GIS-oriented.

The library follows existing conventions:

The library was released with Boost 1.47.0 and from that point on it is oficially part of the Boost C++ Libraries.

Latest stable version of the source code is included in the Boost packaged releases. It can also be downloaded from the current Boost release branch in the Boost Subversion repository.

The library development upstream is available from the Boost trunk in the Boost Subversion repository.

Note that the library extensions are not distributed in the official Boost releases, but only available in the Boost trunk and that they are subject to change.

Boost.Geometry was accepted by Boost at November 28, 2009 (review report).

There are two mailing lists where Boost.Geometry is discussed: the boost developers list, and also the GGL mailing list at osgeo, at which, at the moment of writing, more than 70 people are subscribed. The mailing list is also accessible from Nabble as Boost Geometry.