1[/============================================================================ 2 Boost.Geometry (aka GGL, Generic Geometry Library) 3 4 Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands. 5 Copyright (c) 2008-2013 Bruno Lalande, Paris, France. 6 Copyright (c) 2009-2013 Mateusz Loskot, London, UK. 7 8 Use, modification and distribution is subject to the Boost Software License, 9 Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 10 http://www.boost.org/LICENSE_1_0.txt) 11=============================================================================/] 12 13 14[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically] 15[/ Generated from doxy/doxygen_output/xml/classboost_1_1geometry_1_1strategy_1_1distance_1_1haversine.xml] 16[section:strategy_distance_haversine strategy::distance::haversine] 17 18'''<indexterm><primary>strategy</primary></indexterm><indexterm><primary>distance</primary></indexterm><indexterm><primary>haversine</primary></indexterm>''' 19Distance calculation for spherical coordinates on a perfect sphere using haversine. 20 21[heading Synopsis] 22``template<typename RadiusTypeOrSphere, typename CalculationType> 23class strategy::distance::haversine 24{ 25 // ... 26}; 27`` 28 29[heading Template parameter(s)] 30[table 31[[Parameter] [Default] [Description]] 32[[typename RadiusTypeOrSphere] [double] [numeric type for radius (of sphere, earth) or sphere model ]] 33[[typename CalculationType] [void] [numeric 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 ]] 34] 35 36[heading Constructor(s)] 37[table 38[[Function] [Description] [Parameters] ] 39[[``haversine()`` 40 41] [Default constructor, radius set to 1.0 for the unit sphere. ] [ 42 43]] 44[[``template<typename RadiusOrSphere> 45haversine(RadiusOrSphere const & radius_or_sphere)`` 46 47] [Constructor. ] [[* RadiusOrSphere const &]: ['radius_or_sphere]: radius of the sphere or sphere model 48 49 50 51]] 52] 53 54[heading Member Function(s)] 55[table 56[[Function] [Description] [Parameters] [Returns]] 57[[``template<typename Point1, typename Point2> 58calculation_type< Point1, Point2 >::type apply(Point1 const & p1, Point2 const & p2)`` 59 60] [applies the distance calculation ] [[* Point1 const &]: ['p1]: first point 61 62[* Point2 const &]: ['p2]: second point 63 64 65 66][ 67the calculated distance (including multiplying with radius) 68 69] 70] 71[[``radius_type radius()`` 72 73] [access to radius value ] [ 74 75][ 76the radius 77 78] 79] 80] 81 82[heading Header] 83`#include <boost/geometry/strategies/spherical/distance_haversine.hpp>` 84 85[endsect] 86 87