Boost.Geometry    Boost C++ Libraries
Classes | Public Types | Public Member Functions
boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType > Class Template Reference

Area calculation by spherical excess / Huiller's formula. More...

List of all members.

Classes

struct  excess_sum

Public Types

typedef calculation_type return_type
typedef PointOfSegment segment_point_type
typedef excess_sum state_type

Public Member Functions

void apply (PointOfSegment const &p1, PointOfSegment const &p2, excess_sum &state) const
 huiller (calculation_type radius=1.0)
return_type result (excess_sum const &state) const

Detailed Description

template<typename PointOfSegment, typename CalculationType = void>
class boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >

Area calculation by spherical excess / Huiller's formula.

Template Parameters:
PointOfSegmentpoint type of segments of rings/polygons
CalculationTypenumeric type for calculation (e.g. high precision); if [*void] then it is extracted automatically from the coordinate type and (if necessary) promoted to floating point
Author:
Barend Gehrels. Adapted from:
Note:
The version in Graphics Gems IV (page 132-137) didn't account for polygons crossing the 0 and 180 meridians. The fix for this algorithm can be found in Graphics Gems V (pages 45-46). See:
This version works for convex and non-convex polygons, for 180 meridian crossing polygons and for polygons with holes. However, some cases (especially 180 meridian cases) must still be checked.
The version which sums angles, which is often seen, doesn't handle non-convex polygons correctly.
The version which sums longitudes, see http://hdl.handle.net/2014/40409, is simple and works well in most cases but not in 180 meridian crossing cases. This probably could be solved.
This version is made for spherical equatorial coordinate systems

Member Typedef Documentation

template<typename PointOfSegment , typename CalculationType = void>
typedef calculation_type boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >::return_type
template<typename PointOfSegment , typename CalculationType = void>
typedef PointOfSegment boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >::segment_point_type
template<typename PointOfSegment , typename CalculationType = void>
typedef excess_sum boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >::state_type

Constructor & Destructor Documentation

template<typename PointOfSegment , typename CalculationType = void>
boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >::huiller ( calculation_type  radius = 1.0)

Member Function Documentation

template<typename PointOfSegment , typename CalculationType = void>
void boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >::apply ( PointOfSegment const &  p1,
PointOfSegment const &  p2,
excess_sum state 
) const
template<typename PointOfSegment , typename CalculationType = void>
return_type boost::geometry::strategy::area::huiller< PointOfSegment, CalculationType >::result ( excess_sum const &  state) const

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
Documentation is generated by Doxygen