Traditional comparisons
tnpoint {=, <>, <, >, <=, >=} tnpoint → boolean
SELECT tnpoint '{[NPoint(1, 0.1)@2001-01-01, NPoint(1, 0.3)@2001-01-02),
[NPoint(1, 0.3)@2001-01-02, NPoint(1, 0.5)@2001-01-03]}' =
tnpoint '[NPoint(1, 0.1)@2001-01-01, NPoint(1, 0.5)@2001-01-03]';
-- true
SELECT tnpoint '{[NPoint(1, 0.1)@2001-01-01, NPoint(1, 0.5)@2001-01-03]}' <>
tnpoint '[NPoint(1, 0.1)@2001-01-01, NPoint(1, 0.5)@2001-01-03]';
-- false
SELECT tnpoint '[NPoint(1, 0.1)@2001-01-01, NPoint(1, 0.5)@2001-01-03]' <
tnpoint '[NPoint(1, 0.1)@2001-01-01, NPoint(1, 0.6)@2001-01-03]';
-- true
Ever and always comparisons
{npoint,tnpoint} {?=, ?<>, %=, %<>} {npoint,tnpoint} → boolean
SELECT tnpoint '[Npoint(1, 0.2)@2001-01-01, Npoint(1, 0.4)@2001-01-04)' ?= Npoint(1, 0.3); -- true SELECT tnpoint '[Npoint(1, 0.2)@2001-01-01, Npoint(1, 0.2)@2001-01-04)' &= Npoint(1, 0.2); -- true
Ever and always overlaps
tnpoint {?&&, %&&} stbox → boolean
stbox {?&&, %&&} tnpoint → boolean
tnpoint {?&&, %&&} tnpoint → boolean
Whether the value lies in a spatiotemporal box at some instant, or at every instant at which it is defined, as ?&& and %&& state it for the temporal geometries; a network point lies in a box when its geometric position does. Two values overlap where they are at one place of the map at a time they share: on one route at one fraction, or where their routes cross or meet, which is the spatial equality of their positions, as ST_Equals compares two geometries, where ?= compares the route and the fraction. The position at a fraction of a route is a point computed in doubles, so two positions are one place when they are within the rounding of their coordinates, and a network point cast onto a crossing is at one place with the point of the other route cast onto it.
SELECT tnpoint '[Npoint(1, 0.2)@2001-01-01, Npoint(1, 0.6)@2001-01-03]' ?&& stbox(tnpoint '[Npoint(1, 0.2)@2001-01-01, Npoint(1, 0.6)@2001-01-03]'); -- true SELECT stbox 'STBOX T([2001-01-05, 2001-01-06])' ?&& tnpoint '[Npoint(1, 0.2)@2001-01-01, Npoint(1, 0.6)@2001-01-03]'; -- false SELECT tnpoint '[Npoint(1, 0.2)@2001-01-01, Npoint(1, 0.8)@2001-01-03]' ?&& tnpoint '[Npoint(1, 0.8)@2001-01-01, Npoint(1, 0.2)@2001-01-03]'; -- true SELECT tnpoint '[Npoint(1, 0.2)@2001-01-01, Npoint(1, 0.6)@2001-01-03]' ?&& tnpoint '[Npoint(1, 0.3)@2001-01-01, Npoint(1, 0.7)@2001-01-03]'; -- false
Temporal comparisons
{npoint,tnpoint} {#=, #<>} {npoint,tnpoint} → tbool
SELECT tnpoint '[NPoint(1, 0.2)@2001-01-01,
NPoint(1, 0.4)@2001-01-03)' #= npoint 'NPoint(1, 0.3)';
-- {[f@2001-01-01, t@2001-01-02], (f@2001-01-02, f@2001-01-03)}
SELECT tnpoint '[NPoint(1, 0.2)@2001-01-01, NPoint(1, 0.8)@2001-01-03)' #<>
tnpoint '[NPoint(1, 0.3)@2001-01-01, NPoint(1, 0.7)@2001-01-03)';
-- {[t@2001-01-01, f@2001-01-02], (t@2001-01-02, t@2001-01-03)}