Boost.Geometry    Boost C++ Libraries
Performance

The performance has been tested for some algorithms, concluding that Boost.Geometry is highly comparative (http://trac.osgeo.org/ggl/wiki/Performance).

Performance notes

In the page about compiling the library there are some hints provided which might improve the performance.

Furthermore it is important to realize that if you're about to do calculations with two geometries, for example a point-in-polygon or an intersection, it is very useful to first calculate and store all bounding boxes (envelopes), and then before doing a point-in-polygon check if the point is in the bounding box. Checking if a point is within a box is of course much faster than visiting all vertices of a polygon.

The storage of bounding boxes is, on purpose, not done within the library because it would break the possibility to use standard vectors of points for linestrings or rings. The library might get a traits system in the future where geometries might tell their boundaries to the algorithms, this however would be an optional system.


April 2, 2011

Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands
Copyright © 2008-2011 Bruno Lalande, Paris, France
Copyright © 2009-2010 Mateusz Loskot, London, UK
Documentation is generated by Doxygen