doxygen_mainpage.hpp 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. #ifndef _DOXYGEN_MAINPAGE_HPP
  9. #define _DOXYGEN_MAINPAGE_HPP
  10. // -> introduction.qbk
  11. // -> quickstart.qbk
  12. /*!
  13. \mainpage Boost.Geometry
  14. \section header Boost.Geometry (aka GGL, Generic Geometry Library)
  15. <em>
  16. Copyright &copy; 1995-2012 <b>Barend Gehrels</b>, Geodan, Amsterdam, the Netherlands.\n
  17. Copyright &copy; 2008-2012 <b>Bruno Lalande</b>, Paris, France.\n
  18. Copyright &copy; 2010-2012 <b>Mateusz Loskot</b>, Cadcorp, London, UK.\n
  19. Distributed under the Boost Software License, Version 1.0.\n
  20. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  21. </em>
  22. \section intro Introduction
  23. Boost.Geometry, formally accepted by Boost, defines concepts "concepts" for geometries and
  24. implements some algorithms on such geometries. Before acceptance by Boost it was known as GGL
  25. (Generic Geometry Library) and this documentation still contains that name on various places.
  26. Boost.Geometry contains a dimension-agnostic, coordinate-system-agnostic and
  27. scalable kernel, based on concepts, meta-functions and tag- dispatching. On top
  28. of that kernel, algorithms are built: area, length, perimeter, centroid, convex
  29. hull, intersection (clipping), within (point in polygon), distance, envelope
  30. (bounding box), simplify, transform, convert, and more. The library is also
  31. designed to support high precision arithmetic numbers, such as GMP.
  32. 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.
  33. 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.
  34. 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.
  35. The library follows existing conventions:
  36. - conventions from boost
  37. - conventions from the std library
  38. - conventions and names from one of the OGC standards on Geometry
  39. The library can be downloaded from the Boost Sandbox,
  40. go to the \ref download "Download page" for more information.
  41. A (recently started) Wiki is here: http://trac.osgeo.org/ggl/wiki
  42. \section quickstart Quick start
  43. It is not possible to show the whole library at a glance. A few very small examples are shown below.
  44. It should be possible to use a very small part of the library,
  45. for example only the distance between two points.
  46. \dontinclude doxygen_2.cpp
  47. \skip example_for_main_page()
  48. \skipline int a
  49. \until endl;
  50. Other often used algorithms are point-in-polygon:
  51. \skipline ring_2d
  52. \until endl;
  53. or area:
  54. \skip area
  55. \until endl;
  56. It is possible, by the nature of a template library, to mix the point types declared above:
  57. \skip double d2
  58. \until endl;
  59. The pieces above generate this output:
  60. \image html output_main.png
  61. It is also possible to use non-Cartesian points.
  62. For example: points on a sphere. When then an algorithm such as distance
  63. is used the library "inspects" that it is handling spherical
  64. points and calculates the distance over the sphere, instead of applying the Pythagorean theorem.
  65. Finally an example from a totally different domain: developing window-based applications, for example
  66. using QtWidgets. We check if two rectangles overlap and if so,
  67. move the second one to another place:
  68. \skip QRect
  69. \until }
  70. More examples are on the page \b Examples
  71. */
  72. #endif // _DOXYGEN_MAINPAGE_HPP