[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
Use, modification and distribution is subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================/]
[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
[/ Generated from doxy/doxygen_output/xml/group__area.xml]
[section:area_1 area]
'''area'''
Calculates the area of a geometry.
[heading Description]
The free function area calculates the area of a geometry. It uses the default strategy, based on the coordinate system of the geometry.
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.
The area calculation can be done in all three common coordinate systems, Cartesian, Spherical and Geographic as well.
[heading Synopsis]
``template
area_result::type area(Geometry const & geometry)``
[heading Parameters]
[table
[[Type] [Concept] [Name] [Description] ]
[[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
]
[heading Returns]
The calculated area
[heading Header]
Either
`#include `
Or
`#include `
[include reference/algorithms/area.qbk]
[heading Examples]
[area] [area_output]
[endsect]
[section:area_2_with_strategy area (with strategy)]
'''area'''
Calculates the area of a geometry using the specified strategy.
[heading Description]
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.
[heading Synopsis]
``template
area_result::type area(Geometry const & geometry, Strategy const & strategy)``
[heading Parameters]
[table
[[Type] [Concept] [Name] [Description] ]
[[Geometry const &] [Any type fulfilling a Geometry Concept ] [geometry] [A model of the specified concept ]]
[[Strategy const &] [Any type fulfilling a Area Strategy Concept ] [strategy] [The strategy which will be used for area calculations ]]
]
[heading Returns]
The calculated area
[heading Header]
Either
`#include `
Or
`#include `
[include reference/algorithms/area.qbk]
[heading Available Strategies]
* [link geometry.reference.strategies.strategy_area_cartesian Cartesian]
* [link geometry.reference.strategies.strategy_area_spherical Spherical]
* [link geometry.reference.strategies.strategy_area_geographic Geographic]
[heading Example]
[area_with_strategy]
[area_with_strategy_output]
[endsect]