MobilityDB 1.1

◆ closest_point_on_segment_sphere()

long double closest_point_on_segment_sphere ( const POINT4D p,
const POINT4D A,
const POINT4D B,
POINT4D closest,
double *  dist 
)

Return a float between 0 and 1 representing the location of the closest point on the geography segment to the given point, as a fraction of total segment length.

Parameters
[in]pReference point
[in]A,BPoints defining the segment
[out]closestClosest point in the segment
[out]distDistance between the closest point and the reference point