[/============================================================================ 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__closest__points.xml] [section:closest_points_3 closest_points] '''<indexterm><primary>closest_points</primary></indexterm>''' Compute the closest points between two geometries. [heading Description] The free function closest\u005fpoints calculates the closest points between two geometries. It uses the default strategy, based on the coordinate system of the geometry. [heading Synopsis] ``template<typename Geometry1, typename Geometry2, typename Segment> void closest_points(Geometry1 const & geometry1, Geometry2 const & geometry2, Segment & shortest_seg)`` [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 ]] [[Segment &] [Any type fulfilling a Segment Concept ] [shortest_seg] [Output segment containing the closest points]] ] [heading Header] Either `#include <boost/geometry.hpp>` Or `#include <boost/geometry/algorithms/closest_points.hpp>` [heading Example] [closest_points] [closest_points_output] [heading See also] * [link geometry.reference.algorithms.distance distance] [endsect] [section:closest_points_4_with_strategy closest_points (with strategy)] '''<indexterm><primary>closest_points</primary></indexterm>''' Calculate the closest points between two geometries using the specified strategy. [heading Description] The free function closest\u005fpoints 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 Segment, typename Strategy> void closest_points(Geometry1 const & geometry1, Geometry2 const & geometry2, Segment & shortest_seg, 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 ]] [[Segment &] [Any type fulfilling a Segment Concept ] [shortest_seg] [Output segment containing the closest points ]] [[Strategy const &] [Any type fulfilling a Closest Points Strategy Concept ] [strategy] [The strategy which will be used for closest_points calculations ]] ] [heading Header] Either `#include <boost/geometry.hpp>` Or `#include <boost/geometry/algorithms/closest_points.hpp>` [heading Example] [closest_points_strategy] [closest_points_strategy_output] [heading See also] * [link geometry.reference.algorithms.distance distance] [endsect]