MobilityDB 1.1

◆ tgeompoint_min_dist_at_timestamp()

static bool tgeompoint_min_dist_at_timestamp ( const TInstant start1,
const TInstant end1,
const TInstant start2,
const TInstant end2,
Datum value,
TimestampTz t 
)
static

Return the value and timestamp at which the two temporal geometric point segments are at the minimum distance.

These are the turning points when computing the temporal distance.

Parameters
[in]start1,end1Instants defining the first segment
[in]start2,end2Instants defining the second segment
[out]valueValue
[out]tTimestamp
Note
The PostGIS functions lw_dist2d_seg_seg and lw_dist3d_seg_seg cannot be used since they do not take time into consideration and would return, e.g., that the minimum distance between the two following segments [Point(2 2)@t1, Point(1 1)@t2] and [Point(3 1)@t1, Point(1 1)@t2] is at Point(2 2)@t2 instead of Point(1.5 1.5)@(t1 + (t2 - t1)/2).
Precondition
The segments are not both constants.
Note