area.qbk 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. [/============================================================================
  2. Boost.Geometry (aka GGL, Generic Geometry Library)
  3. Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
  4. Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
  5. Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
  6. Use, modification and distribution is subject to the Boost Software License,
  7. Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  8. http://www.boost.org/LICENSE_1_0.txt)
  9. =============================================================================/]
  10. [/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
  11. [/ Generated from doxy/doxygen_output/xml/group__area.xml]
  12. [section:area_1 area]
  13. '''<indexterm><primary>area</primary></indexterm>'''
  14. Calculates the area of a geometry.
  15. [heading Description]
  16. The free function area calculates the area of a geometry. It uses the default strategy, based on the coordinate system of the geometry.
  17. The area algorithm calculates the surface area of all geometries having a surface, namely box, polygon, ring, multipolygon. The units are the square of the units used for the points defining the surface. If subject geometry is defined in meters, then area is calculated in square meters.
  18. The area calculation can be done in all three common coordinate systems, Cartesian, Spherical and Geographic as well.
  19. [heading Synopsis]
  20. ``template<typename Geometry>
  21. area_result<Geometry>::type area(Geometry const & geometry)``
  22. [heading Parameters]
  23. [table
  24. [[Type] [Concept] [Name] [Description] ]
  25. [[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
  26. ]
  27. [heading Returns]
  28. The calculated area
  29. [heading Header]
  30. Either
  31. `#include <boost/geometry.hpp>`
  32. Or
  33. `#include <boost/geometry/algorithms/area.hpp>`
  34. [include reference/algorithms/area.qbk]
  35. [heading Examples]
  36. [area] [area_output]
  37. [endsect]
  38. [section:area_2_with_strategy area (with strategy)]
  39. '''<indexterm><primary>area</primary></indexterm>'''
  40. Calculates the area of a geometry using the specified strategy.
  41. [heading Description]
  42. The free function area calculates the area of a geometry using the specified strategy. Reasons to specify a strategy include: use another coordinate system for calculations; construct the strategy beforehand (e.g. with the radius of the Earth); select a strategy when there are more than one available for a calculation.
  43. [heading Synopsis]
  44. ``template<typename Geometry, typename Strategy>
  45. area_result<Geometry, Strategy>::type area(Geometry const & geometry, Strategy const & strategy)``
  46. [heading Parameters]
  47. [table
  48. [[Type] [Concept] [Name] [Description] ]
  49. [[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
  50. [[Strategy const &] [Any type fulfilling a Area Strategy Concept ] [strategy] [The strategy which will be used for area calculations ]]
  51. ]
  52. [heading Returns]
  53. The calculated area
  54. [heading Header]
  55. Either
  56. `#include <boost/geometry.hpp>`
  57. Or
  58. `#include <boost/geometry/algorithms/area.hpp>`
  59. [include reference/algorithms/area.qbk]
  60. [heading Available Strategies]
  61. * [link geometry.reference.strategies.strategy_area_cartesian Cartesian]
  62. * [link geometry.reference.strategies.strategy_area_spherical Spherical]
  63. * [link geometry.reference.strategies.strategy_area_geographic Geographic]
  64. [heading Example]
  65. [area_with_strategy]
  66. [area_with_strategy_output]
  67. [endsect]