distance_haversine.qbk 2.5 KB

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