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

◆ lw_distance_fraction()

static double lw_distance_fraction ( const LWGEOM geom1,
const LWGEOM geom2,
int  mode,
double *  fraction 
)
static

Return the distance between 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