MobilityDB 1.3
Loading...
Searching...
No Matches

◆ pointsegm_locate()

long double pointsegm_locate ( Datum  start,
Datum  end,
Datum  point,
double *  dist 
)

Return a float in (0,1) representing the location of the closest point on the line segment to the given point, as a fraction of the total segment length, return -1.0 if the point is not located in the segment or if is approximately equal to the start or to the end point.

Parameters
[in]start,endPoints defining the segment
[in]pointReference point
[out]distDistance
Note
The function returns -1.0 if the point is approximately equal to the start or the end point since it is used in the lifting infrastructure for determining the crossings or the turning points after verifying that the bounds of the segment are not equal to the point.