![]() |
![]() |
Boost.Geometry is a Header Only library. So just including the headerfiles is enough to use the algorithms. Nothing has to be linked.
Boost.Geometry is only dependant on (header only) Boost libraries. Download the Boost Library Collection from www.boost.org, adapt the include path to include Boost.
The library currently compiles successfully on the following platforms:
For Visual Studio, the examples contains some project files (for 2005). However, because the library is header only, it will be no problem to integrate it in your own project files.
The test and example folders contain also Jam-files for bjam / boost-build
For gcc, the flag -Wno-long-long can be used (surpressing warnings originating from Boost)
This section concentrates on how to include GGL.
The most convenient headerfile including all algorithms and strategies is geometry.hpp:
An often used headerfile is geometries.hpp:
For users using only Cartesian points, with floating point coordinates (double), in 2D or 3D, you can use instead:
This section is for users who have their own geometries and want to use algorithms from the Boost.Geometry.
If you want to use your own points it makes sense to use the registration macro's:
The GGL is currently (since 0.5) split into the kernel and several extensions. As this split is relatively new, there are not yet umbrella-include files, but most things below will do:
If you want to use the geographic coordinate system:
If you want to use the projections:
If you want to use the circle (n-sphere)
The enumeration below is not exhaustive but can contain hints to improve the performance
Microsoft Visual Studio (Express) 2005 and 2008 can hang typing in a bracket or angle bracket. This is not directly related to GGL, but caused by heavy templated libraries such as Boost and GGL. If this is inconvenient, intellisense can easily be turned off:
(...) disabling Intellisense in VC++. There is a file called feacp.dll in <VS8INSTALL>/VC/vcpackages folder. Renaming this file will disable Intellisense feature.
Source: http://blogs.msdn.com/yash/archive/2007/09/19/intellisense-issues-in-visual-c-2005.aspx
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 |