MobilityDB 1.1

◆ tinterrel_tpointinst_geom()

TInstant * tinterrel_tpointinst_geom ( const TInstant inst,
Datum  geom,
bool  tinter,
Datum(*)(Datum, Datum func 
)

Temporal spatial relationships for temporal points.

These relationships are applied at each instant and result in a temporal Boolean.

The following relationships are supported for a temporal geometry point and a geometry: tcontains, tdisjoint, tintersects, ttouches, and tdwithin.

The following relationships are supported for two temporal geometry points: tdwithin.

The following relationships are supported for two temporal geography points: tdisjoint, tintersects, tdwithin.

tintersects and tdisjoint for a temporal point and a geometry allow a fast implementation by (1) using bounding box tests, and (2) splitting temporal sequence points into an array of simple (that is, not self-intersecting) fragments and the answer is computed for each fragment without any additional call to PostGIS.

The implementation of tcontains and ttouches involving a temporal point and a geometry is derived from the above by computing the boundary of the geometry and (1) tcontains(geo, tpoint) = tintersects(geo, tpoint) & ~ tintersects(st_boundary(geo), tpoint) where & and ~ are the temporal boolean operators and and not (2) ttouches(geo, tpoint) = tintersects(st_boundary(geo), tpoint)

Notice also that twithin has a custom implementation as follows

  • In the case of a temporal point and a geometry we (1) call PostGIS to compute a buffer of the geometry and the distance parameter d, and (2) compute the result from tpointseq_at_geometry(seq, geo_buffer)
  • In the case of two temporal points we need to compute the instants at which two temporal sequences have a distance d between each other, which amounts to solve the equation distance(seg1(t), seg2(t)) = d.

Evaluates tintersects/tdisjoint for a temporal point and a geometry.

Parameters
[in]instTemporal point
[in]geomGeometry
[in]tinterTrue when computing tintersects, false for tdisjoint
[in]funcPostGIS function to be called