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

Click here to view the latest version of this page.
PrevUpHomeNext

strategy::distance::cross_track

Strategy functor for distance point to segment calculation.

Description

Class which calculates the distance of a point to a segment, using latlong points

Synopsis

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

Template parameter(s)

Parameter

Default

Description

typename Point

point type

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

typename services::default_strategy<point_tag, Point>::type

underlying point-point distance strategy, defaults to haversine

Constructor(s)

Function

Description

Parameters

cross_track()

cross_track(return_type const & r)

return_type const &: r:

cross_track(Strategy const & s)

Strategy const &: s:

Member Function(s)

Function

Description

Parameters

Returns

return_type apply(Point const & p, PointOfSegment const & sp1, PointOfSegment const & sp2)

Point const &: p:

PointOfSegment const &: sp1:

PointOfSegment const &: sp2:

return_type radius()

Header

#include <boost/geometry/strategies/spherical/distance_cross_track.hpp>

See also

distance (with strategy)


PrevUpHomeNext