![]() |
![]() |
Classes | |
class | boost::geometry::concepts::AreaStrategy< Strategy > |
Checks strategy for area. More... | |
struct | boost::geometry::default_area_result< Geometry > |
Meta-function defining return type of area function, using the default strategy. More... | |
struct | boost::geometry::strategy::area::services::default_strategy< Tag, PointOfSegment > |
Traits class binding a default area strategy to a coordinate system. More... | |
Functions | |
template<typename Geometry > | |
default_area_result< Geometry > ::type | boost::geometry::area (Geometry const &geometry) |
Calculates the area of a geometry. More... | |
template<typename Geometry , typename Strategy > | |
Strategy::return_type | boost::geometry::area (Geometry const &geometry, Strategy const &strategy) |
Calculates the area of a geometry using the specified strategy. More... | |
default_area_result<Geometry>::type boost::geometry::area | ( | Geometry const & | geometry | ) |
Calculates the area of a geometry.
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.
Geometry | Any type fulfilling a Geometry Concept |
geometry | A model of the specified concept |
Strategy::return_type boost::geometry::area | ( | Geometry const & | geometry, |
Strategy const & | strategy | ||
) |
Calculates the area of a geometry using the specified strategy.
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.
Geometry | Any type fulfilling a Geometry Concept |
Strategy | Any type fulfilling a Area Strategy Concept |
geometry | A model of the specified concept |
strategy | The strategy which will be used for area calculations |
April 2, 2011 |
Copyright © 2007-2011 Barend Gehrels, Amsterdam, the Netherlands Copyright © 2008-2011 Bruno Lalande, Paris, France Copyright © 2009-2010 Mateusz Loskot, London, UK |