| Home | Libraries | People | FAQ | More

#### strategy::distance::projected_point

Strategy for distance point to segment.

###### Description

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

###### Synopsis

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

###### Template parameter(s)

Parameter | Default | Description
--- | --- | ---
typename Point |  | Any type fulfilling a Point Concept
typename PointOfSegment | Point | segment point type
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<Point, PointOfSegment, CalculationType> | underlying point-point distance strategy

###### Member Function(s)

Function | Description | Parameters | Returns
--- | --- | --- | ---

    calculation_type apply(Point const & p, PointOfSegment const & p1, PointOfSegment const & p2)

Point const &: p:

PointOfSegment const &: p1:

PointOfSegment const &: p2:

###### Header

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

###### See also

distance (with strategy)