MobilityDB  1.0

◆ closest_point3dz_on_segment_ratio()

long double closest_point3dz_on_segment_ratio ( const POINT3DZ *  p,
const POINT3DZ *  A,
const POINT3DZ *  B,
POINT3DZ *  closest 
)

Returns a float between 0 and 1 representing the location of the closest point on the segment to the given point, as a fraction of total segment length (3D version).

Note
Function derived from the PostGIS function closest_point_on_segment.