MobilityDB 1.1

◆ tpointsegm_timestamp_at_value1()

static bool tpointsegm_timestamp_at_value1 ( const TInstant inst1,
const TInstant inst2,
Datum  value,
TimestampTz t 
)
static

Return the timestamp at which a segment of a temporal point takes a base value.

This function must take into account the roundoff errors and thus it uses the datum_point_eq_eps for comparing two values so the coordinates of the values may differ by MOBDB_EPSILON. Furthermore, we must drop the Z values since this function may be called for finding the intersection of a sequence and a geometry and the Z values crrently given by PostGIS/GEOS are not necessarily extact, they "are copied, averaged or interpolated" as stated in https://postgis.net/docs/ST_Intersection.html

Parameters
[in]inst1,inst2Temporal values
[in]valueBase value
[out]tTimestamp
Returns
Return true if the point is found in the temporal point
Precondition
The segment is not constant and has linear interpolation
Note
The resulting timestamp may be at an exclusive bound