mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 13:34:10 +00:00
123 lines
4.2 KiB
Plaintext
123 lines
4.2 KiB
Plaintext
[/============================================================================
|
|
Boost.Geometry (aka GGL, Generic Geometry Library)
|
|
|
|
Copyright (c) 2009-2011 Barend Gehrels, Geodan, Amsterdam, the Netherlands.
|
|
Copyright (c) 2009-2011 Mateusz Loskot (mateusz@loskot.net)
|
|
Copyright (c) 2009-2011 Bruno Lalande, Paris, France.
|
|
|
|
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, don't change, will be overwritten automatically]
|
|
[/ Generated from doxy/doxygen_output/xml/group__distance.xml]
|
|
[section:comparable_distance comparable_distance]
|
|
|
|
Calculate the comparable distance measurement of two geometries.
|
|
|
|
[heading Description]
|
|
The default strategy is used, belonging to the corresponding coordinate system of the geometries and the comparable strategy is used
|
|
|
|
[heading Synopsis]
|
|
``template<typename Geometry1, typename Geometry2>
|
|
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]
|
|
`#include <boost/geometry/algorithms/comparable_distance.hpp>`
|
|
|
|
|
|
[endsect]
|
|
|
|
[section:distance_2 distance]
|
|
|
|
Calculate the distance of two geometries.
|
|
|
|
[heading Description]
|
|
The default strategy is used, belonging to the corresponding coordinate system of the geometries
|
|
|
|
[heading Synopsis]
|
|
``template<typename Geometry1, typename Geometry2>
|
|
distance_result<Geometry1, Geometry2>::type 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/geometry.hpp>`
|
|
|
|
Or
|
|
|
|
`#include <boost/geometry/algorithms/distance.hpp>`
|
|
|
|
|
|
[endsect]
|
|
|
|
[section:distance_3_with_strategy distance (with strategy)]
|
|
|
|
Calculate the distance of two geometries using the specified strategy.
|
|
|
|
[heading Description]
|
|
The free function area calculates the area of a geometry. 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>
|
|
strategy::distance::services::return_type<Strategy>::type 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/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]
|
|
|