• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 //
3 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
4 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
5 // Use, modification and distribution is subject to the Boost Software License,
6 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8 
9 #ifndef _DOXYGEN_MAINPAGE_HPP
10 #define _DOXYGEN_MAINPAGE_HPP
11 
12 
13 // -> introduction.qbk
14 // -> quickstart.qbk
15 
16 /*!
17 \mainpage Boost.Geometry
18 
19 \section header Boost.Geometry (aka GGL, Generic Geometry Library)
20 
21 <em>
22 Copyright &copy; 1995-2012 <b>Barend Gehrels</b>, Geodan, Amsterdam, the Netherlands.\n
23 Copyright &copy; 2008-2012 <b>Bruno Lalande</b>, Paris, France.\n
24 Copyright &copy; 2010-2012 <b>Mateusz Loskot</b>, Cadcorp, London, UK.\n
25 Distributed under the Boost Software License, Version 1.0.\n
26 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
27 </em>
28 
29 \section intro Introduction
30 Boost.Geometry, formally accepted by Boost, defines concepts "concepts" for geometries and
31 implements some algorithms on such geometries. Before acceptance by Boost it was known as GGL
32 (Generic Geometry Library) and this documentation still contains that name on various places.
33 
34 
35 Boost.Geometry contains a dimension-agnostic, coordinate-system-agnostic and
36 scalable kernel, based on concepts, meta-functions and tag- dispatching. On top
37 of that kernel, algorithms are built: area, length, perimeter, centroid, convex
38 hull, intersection (clipping), within (point in polygon), distance, envelope
39 (bounding box), simplify, transform, convert, and more. The library is also
40 designed to support high precision arithmetic numbers, such as GMP.
41 
42 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 the Boost.Geometry Concepts.
43 
44 Boost.Geometry might be used in all domains where geometry plays a role: mapping and GIS, gaming, computer graphics and widgets, robotics, astronomy... The core is designed to be as generic as possible and support those domains. However, for now the development has been mostly GIS-oriented.
45 
46 Boost.Geometry supports the extension model, the same way as GIL also applies it. An extension is (mostly) something more specific to domains like mentioned above.
47 
48 The library follows existing conventions:
49 - conventions from boost
50 - conventions from the std library
51 - conventions and names from one of the OGC standards on Geometry
52 
53 The library can be downloaded from the Boost Sandbox,
54 go to the \ref download "Download page" for more information.
55 
56 A (recently started) Wiki is here: http://trac.osgeo.org/ggl/wiki
57 
58 \section quickstart Quick start
59 It is not possible to show the whole library at a glance. A few very small examples are shown below.
60 
61 It should be possible to use a very small part of the library,
62 for example only the distance between two points.
63 
64 \dontinclude doxygen_2.cpp
65 \skip example_for_main_page()
66 \skipline int a
67 \until endl;
68 
69 Other often used algorithms are point-in-polygon:
70 \skipline ring_2d
71 \until endl;
72 
73 or area:
74 \skip area
75 \until endl;
76 
77 It is possible, by the nature of a template library, to mix the point types declared above:
78 \skip double d2
79 \until endl;
80 
81 The pieces above generate this output:
82 \image html output_main.png
83 
84 
85 It is also possible to use non-Cartesian points.
86 For example: points on a sphere. When then an algorithm such as distance
87 is used the library "inspects" that it is handling spherical
88 points and calculates the distance over the sphere, instead of applying the Pythagorean theorem.
89 
90 Finally an example from a totally different domain: developing window-based applications, for example
91 using QtWidgets. We check if two rectangles overlap and if so,
92 move the second one to another place:
93 \skip QRect
94 \until }
95 
96 More examples are on the page \b Examples
97 
98 
99 */
100 
101 
102 
103 
104 
105 #endif // _DOXYGEN_MAINPAGE_HPP
106