Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

strategy::distance::projected_point

Strategy for distance point to segment.

Description

Calculates distance using projected-point method, and (optionally) Pythagoras

Synopsis

template<typename CalculationType, typename Strategy>
class strategy::distance::projected_point
{
  // ...
};

Template parameter(s)

Parameter

Default

Description

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

typename Strategy

pythagoras<CalculationType>

underlying point-point distance strategy

Member Function(s)

Function

Description

Parameters

Returns

relate_segment_segment_strategy_type get_relate_segment_segment_strategy()

point_in_geometry_strategy_type get_point_in_geometry_strategy()

template<typename Point, typename PointOfSegment>
calculation_type< Point, PointOfSegment >::type apply(Point const & p, PointOfSegment const & p1, PointOfSegment const & p2)

Point const &: p:

PointOfSegment const &: p1:

PointOfSegment const &: p2:

template<typename CT>
CT vertical_or_meridian(CT const & lat1, CT const & lat2)

CT const &: lat1:

CT const &: lat2:

Header

#include <boost/geometry/strategies/cartesian/distance_projected_point.hpp>

See also

distance (with strategy)


PrevUpHomeNext