mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 13:34:10 +00:00
103 lines
3.2 KiB
Plaintext
103 lines
3.2 KiB
Plaintext
[/============================================================================
|
|
Boost.Geometry (aka GGL, Generic Geometry Library)
|
|
|
|
Copyright (c) 2009-2011 Barend Gehrels, Geodan, Amsterdam, the Netherlands.
|
|
Copyright (c) 2009-2011 Mateusz Loskot (mateusz@loskot.net)
|
|
Copyright (c) 2009-2011 Bruno Lalande, Paris, France.
|
|
|
|
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, don't change, will be overwritten automatically]
|
|
[/ Generated from doxy/doxygen_output/xml/group__area.xml]
|
|
[section:area_2_with_strategy area (with strategy)]
|
|
|
|
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<typename Geometry, typename Strategy>
|
|
Strategy::return_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 <boost/geometry/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/algorithms/area.hpp>`
|
|
|
|
[include ref/algorithms/area.qbk]
|
|
|
|
[heading Example]
|
|
[area_with_strategy]
|
|
[area_with_strategy_output]
|
|
|
|
[heading Available Strategies]
|
|
* [link geometry.reference.strategies.strategy_area_surveyor Surveyor (cartesian)]
|
|
* [link geometry.reference.strategies.strategy_area_huiller Huiller (spherical)]
|
|
|
|
|
|
[endsect]
|
|
|
|
[section:area_1 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<typename Geometry>
|
|
area_result<Geometry>::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 <boost/geometry/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/algorithms/area.hpp>`
|
|
|
|
[include ref/algorithms/area.qbk]
|
|
[heading Examples]
|
|
[area] [area_output]
|
|
|
|
|
|
[endsect]
|
|
|