MobilityDB 1.1

◆ lw_distance_fraction()

static double lw_distance_fraction ( const LWGEOM lw1,
const LWGEOM lw2,
int  mode,
long double *  fraction 
)
static

Distance functions for temporal points.

Return the distance between the two geometries. When the first geometry is a segment it also computes a value between 0 and 1 that represents the location in the segment of the closest point to the second geometry, as a fraction of total segment length.

Note
Function inspired by PostGIS function lw_dist2d_distancepoint from measures.c