distance.qbk 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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/group__distance.xml]
  12. [section:comparable_distance_3_with_strategy comparable_distance (with strategy)]
  13. '''<indexterm><primary>comparable_distance</primary></indexterm>'''
  14. Calculate the comparable distance measurement of two geometries using the specified strategy.
  15. [heading Description]
  16. The free function comparable\u005fdistance does not necessarily calculate the distance, but it calculates a distance measure such that two distances are comparable to each other. For example: for the Cartesian coordinate system, Pythagoras is used but the square root is not taken, which makes it faster and the results of two point pairs can still be compared to each other.
  17. [heading Synopsis]
  18. ``template<typename Geometry1, typename Geometry2, typename Strategy>
  19. comparable_distance_result<Geometry1, Geometry2, Strategy>::type comparable_distance(Geometry1 const & geometry1, Geometry2 const & geometry2, Strategy const & strategy)``
  20. [heading Parameters]
  21. [table
  22. [[Type] [Concept] [Name] [Description] ]
  23. [[Geometry1 const &] [first geometry type ] [geometry1] [A model of the specified concept ]]
  24. [[Geometry2 const &] [second geometry type ] [geometry2] [A model of the specified concept ]]
  25. [[Strategy const &] [Any type fulfilling a Distance Strategy Concept ] [strategy] [The strategy which will be used for distance calculations ]]
  26. ]
  27. [heading Returns]
  28. The calculated comparable distance
  29. [heading Header]
  30. Either
  31. `#include <boost/geometry.hpp>`
  32. Or
  33. `#include <boost/geometry/algorithms/comparable_distance.hpp>`
  34. [endsect]
  35. [section:comparable_distance_2 comparable_distance]
  36. '''<indexterm><primary>comparable_distance</primary></indexterm>'''
  37. Calculate the comparable distance measurement of two geometries.
  38. [heading Description]
  39. The free function comparable\u005fdistance does not necessarily calculate the distance, but it calculates a distance measure such that two distances are comparable to each other. For example: for the Cartesian coordinate system, Pythagoras is used but the square root is not taken, which makes it faster and the results of two point pairs can still be compared to each other.
  40. [heading Synopsis]
  41. ``template<typename Geometry1, typename Geometry2>
  42. default_comparable_distance_result<Geometry1, Geometry2>::type comparable_distance(Geometry1 const & geometry1, Geometry2 const & geometry2)``
  43. [heading Parameters]
  44. [table
  45. [[Type] [Concept] [Name] [Description] ]
  46. [[Geometry1 const &] [first geometry type ] [geometry1] [A model of the specified concept ]]
  47. [[Geometry2 const &] [second geometry type ] [geometry2] [A model of the specified concept ]]
  48. ]
  49. [heading Returns]
  50. The calculated comparable distance
  51. [heading Header]
  52. Either
  53. `#include <boost/geometry.hpp>`
  54. Or
  55. `#include <boost/geometry/algorithms/comparable_distance.hpp>`
  56. [include reference/algorithms/comparable_distance.qbk]
  57. [endsect]
  58. [section:distance_3_with_strategy distance (with strategy)]
  59. '''<indexterm><primary>distance</primary></indexterm>'''
  60. Calculate the distance between two geometries using the specified strategy.
  61. [heading Description]
  62. The free function distance calculates the distance between two geometries 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.
  63. [heading Synopsis]
  64. ``template<typename Geometry1, typename Geometry2, typename Strategy>
  65. distance_result<Geometry1, Geometry2, Strategy>::type distance(Geometry1 const & geometry1, Geometry2 const & geometry2, Strategy const & strategy)``
  66. [heading Parameters]
  67. [table
  68. [[Type] [Concept] [Name] [Description] ]
  69. [[Geometry1 const &] [Any type fulfilling a Geometry Concept ] [geometry1] [A model of the specified concept ]]
  70. [[Geometry2 const &] [Any type fulfilling a Geometry Concept ] [geometry2] [A model of the specified concept ]]
  71. [[Strategy const &] [Any type fulfilling a Distance Strategy Concept ] [strategy] [The strategy which will be used for distance calculations ]]
  72. ]
  73. [heading Returns]
  74. The calculated distance
  75. [heading Header]
  76. Either
  77. `#include <boost/geometry.hpp>`
  78. Or
  79. `#include <boost/geometry/algorithms/distance.hpp>`
  80. [heading Available Strategies]
  81. * [link geometry.reference.strategies.strategy_distance_pythagoras Pythagoras (cartesian)]
  82. * [link geometry.reference.strategies.strategy_distance_haversine Haversine (spherical)]
  83. * [link geometry.reference.strategies.strategy_distance_cross_track Cross track (spherical, point-to-segment)]
  84. * [link geometry.reference.strategies.strategy_distance_projected_point Projected point (cartesian, point-to-segment)]
  85. * more (currently extensions): Vincenty, Andoyer (geographic)
  86. [endsect]
  87. [section:distance_2 distance]
  88. '''<indexterm><primary>distance</primary></indexterm>'''
  89. Calculate the distance between two geometries.
  90. [heading Description]
  91. The free function distance calculates the distance between two geometries. It uses the default strategy, based on the coordinate system of the geometry.
  92. [heading Synopsis]
  93. ``template<typename Geometry1, typename Geometry2>
  94. default_distance_result<Geometry1, Geometry2>::type distance(Geometry1 const & geometry1, Geometry2 const & geometry2)``
  95. [heading Parameters]
  96. [table
  97. [[Type] [Concept] [Name] [Description] ]
  98. [[Geometry1 const &] [Any type fulfilling a Geometry Concept ] [geometry1] [A model of the specified concept ]]
  99. [[Geometry2 const &] [Any type fulfilling a Geometry Concept ] [geometry2] [A model of the specified concept ]]
  100. ]
  101. [heading Returns]
  102. The calculated distance
  103. [heading Header]
  104. Either
  105. `#include <boost/geometry.hpp>`
  106. Or
  107. `#include <boost/geometry/algorithms/distance.hpp>`
  108. [include reference/algorithms/distance.qbk]
  109. [endsect]