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

◆ tgeompointsegm_distance_turnpt()

int tgeompointsegm_distance_turnpt ( Datum  start1,
Datum  end1,
Datum  start2,
Datum  end2,
Datum param  UNUSED,
TimestampTz  lower,
TimestampTz  upper,
TimestampTz t1,
TimestampTz t2 
)

Return 1 the timestamp at which two temporal geometry point segments are at the minimum distance.

These are the turning points when computing the temporal distance.

Parameters
[in]start1,end1Values defining the first segment
[in]start2,end2Values defining the second segment
[in]paramAdditional parameter
[in]lower,upperTimestamps defining the segments
[out]t1,t2
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.
Postcondition
As there is a single turning point, t2 is set to t