[/============================================================================
  Boost.Geometry (aka GGL, Generic Geometry Library)

  Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
  Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
  Copyright (c) 2009-2013 Mateusz Loskot, London, UK.

  Use, modification and distribution is subject to the Boost Software License,
  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  http://www.boost.org/LICENSE_1_0.txt)
=============================================================================/]


[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
[/ Generated from doxy/doxygen_output/xml/group__distance.xml]
[section:comparable_distance_3_with_strategy comparable_distance (with strategy)]

'''<indexterm><primary>comparable_distance</primary></indexterm>'''
Calculate the comparable distance measurement of two geometries using the specified strategy. 

[heading Description]
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. 

[heading Synopsis]
``template<typename Geometry1, typename Geometry2, typename Strategy>
comparable_distance_result<Geometry1, Geometry2, Strategy>::type comparable_distance(Geometry1 const & geometry1, Geometry2 const & geometry2, Strategy const & strategy)``

[heading Parameters]

[table
[[Type] [Concept] [Name] [Description] ]
[[Geometry1 const &] [first geometry type ] [geometry1] [A model of the specified concept ]]
[[Geometry2 const &] [second geometry type ] [geometry2] [A model of the specified concept ]]
[[Strategy const &] [Any type fulfilling a Distance Strategy Concept ] [strategy] [The strategy which will be used for distance calculations ]]
]


[heading Returns]
The calculated comparable distance

[heading Header]
Either

`#include <boost/geometry.hpp>`


Or

`#include <boost/geometry/algorithms/comparable_distance.hpp>`


[endsect]

[section:comparable_distance_2 comparable_distance]

'''<indexterm><primary>comparable_distance</primary></indexterm>'''
Calculate the comparable distance measurement of two geometries. 

[heading Description]
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. 

[heading Synopsis]
``template<typename Geometry1, typename Geometry2>
default_comparable_distance_result<Geometry1, Geometry2>::type comparable_distance(Geometry1 const & geometry1, Geometry2 const & geometry2)``

[heading Parameters]

[table
[[Type] [Concept] [Name] [Description] ]
[[Geometry1 const &] [first geometry type ] [geometry1] [A model of the specified concept ]]
[[Geometry2 const &] [second geometry type ] [geometry2] [A model of the specified concept ]]
]


[heading Returns]
The calculated comparable distance

[heading Header]
Either

`#include <boost/geometry.hpp>`


Or

`#include <boost/geometry/algorithms/comparable_distance.hpp>`

[include reference/algorithms/comparable_distance.qbk]


[endsect]

[section:distance_3_with_strategy distance (with strategy)]

'''<indexterm><primary>distance</primary></indexterm>'''
Calculate the distance between two geometries using the specified strategy. 

[heading Description]
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.

[heading Synopsis]
``template<typename Geometry1, typename Geometry2, typename Strategy>
auto distance(Geometry1 const & geometry1, Geometry2 const & geometry2, Strategy const & strategy)``

[heading Parameters]

[table
[[Type] [Concept] [Name] [Description] ]
[[Geometry1 const &] [Any type fulfilling a Geometry Concept ] [geometry1] [A model of the specified concept ]]
[[Geometry2 const &] [Any type fulfilling a Geometry Concept ] [geometry2] [A model of the specified concept ]]
[[Strategy const &] [Any type fulfilling a Distance Strategy Concept ] [strategy] [The strategy which will be used for distance calculations ]]
]


[heading Returns]
The calculated distance 

[heading Header]
Either

`#include <boost/geometry.hpp>`


Or

`#include <boost/geometry/algorithms/distance.hpp>`

[heading Available Strategies]
* [link geometry.reference.strategies.strategy_distance_pythagoras Pythagoras (cartesian)]
* [link geometry.reference.strategies.strategy_distance_haversine Haversine (spherical)]
* [link geometry.reference.strategies.strategy_distance_cross_track Cross track (spherical, point-to-segment)]
* [link geometry.reference.strategies.strategy_distance_projected_point Projected point (cartesian, point-to-segment)]
* more (currently extensions): Vincenty, Andoyer (geographic)


[endsect]

[section:distance_2 distance]

'''<indexterm><primary>distance</primary></indexterm>'''
Calculate the distance between two geometries. 

[heading Description]
The free function distance calculates the distance between two geometries. It uses the default strategy, based on the coordinate system of the geometry.

[heading Synopsis]
``template<typename Geometry1, typename Geometry2>
auto distance(Geometry1 const & geometry1, Geometry2 const & geometry2)``

[heading Parameters]

[table
[[Type] [Concept] [Name] [Description] ]
[[Geometry1 const &] [Any type fulfilling a Geometry Concept ] [geometry1] [A model of the specified concept ]]
[[Geometry2 const &] [Any type fulfilling a Geometry Concept ] [geometry2] [A model of the specified concept ]]
]


[heading Returns]
The calculated distance

[heading Header]
Either

`#include <boost/geometry.hpp>`


Or

`#include <boost/geometry/algorithms/distance.hpp>`

[include reference/algorithms/distance.qbk]


[endsect]

