Las relaciones espaciales evalúan un argumento th3index a través de la geometría de frontera de celda en cada instante,la huella hexagonal de cada celda, devuelta por th3CellToBoundary— y luego aplican la relación correspondiente de los tipos geométricos temporales. Cada relación tiene tres formas cuantificadas: la forma alguna vez con prefijo e devuelve true cuando la relación se cumple en algún instante, la forma siempre con prefijo a cuando se cumple en todos los instantes, y la forma temporal con prefijo t devuelve un tbool con el resultado instante a instante. Todas las formas aceptan los tres órdenes de argumentos (geometry, th3index), (th3index, geometry) y (th3index, th3index).
Si una huella contiene a la otra (solo interiores)
eContains, aContains, tContains
SELECT eContains(geometry 'SRID=4326;Polygon((-123 37,-123 38,-122 38,-122 37,-123 37))', th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]'); -- true SELECT tContains(geometry 'SRID=4326;Polygon((-123 37,-123 38,-122 38,-122 37,-123 37))', th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]'); -- [t@2001-01-01, t@2001-01-02]
Si una huella cubre a la otra (frontera incluida)
eCovers, aCovers, tCovers
SELECT eCovers(geometry 'SRID=4326;Polygon((-123 37,-123 38,-122 38,-122 37,-123 37))', th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]'); -- true SELECT tCovers(geometry 'SRID=4326;Polygon((-123 37,-123 38,-122 38,-122 37,-123 37))', th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]'); -- [t@2001-01-01, t@2001-01-02]
Si las huellas no comparten ningún punto
eDisjoint, aDisjoint, tDisjoint
SELECT eDisjoint(th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]', th3index '[88283082b3fffff@2001-01-01, 88283082b1fffff@2001-01-02]'); -- true SELECT tDisjoint(th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]', th3index '[88283082b3fffff@2001-01-01, 88283082b1fffff@2001-01-02]'); -- [t@2001-01-01, t@2001-01-02]
Si las huellas comparten al menos un punto
eIntersects, aIntersects, tIntersects
SELECT eIntersects(th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]', th3index '[8828308281fffff@2001-01-01, 88283082b1fffff@2001-01-02]'); -- true SELECT tIntersects(th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]', th3index '[8828308281fffff@2001-01-01, 88283082b1fffff@2001-01-02]'); -- [t@2001-01-01, f@2001-01-02]
Si las huellas comparten un punto de frontera pero ningún punto interior
eTouches, aTouches, tTouches
SELECT eTouches(th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]', th3index '[8828308283fffff@2001-01-01, 8828308285fffff@2001-01-02]'); -- true SELECT tTouches(th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]', th3index '[8828308283fffff@2001-01-01, 8828308285fffff@2001-01-02]'); -- [t@2001-01-01, f@2001-01-02]
Si las huellas se encuentran dentro de una distancia dada, pasada como tercer argumento
eDwithin, aDwithin, tDwithin (…, dist float)
SELECT eDwithin(th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]', th3index '[88283082b3fffff@2001-01-01, 88283082b1fffff@2001-01-02]', 5000); -- true SELECT tDwithin(th3index '[8828308281fffff@2001-01-01, 8828308283fffff@2001-01-02]', th3index '[88283082b3fffff@2001-01-01, 88283082b1fffff@2001-01-02]', 5000); -- [t@2001-01-01, t@2001-01-02]
SELECT eContains( geometry 'SRID=4326;Polygon((4.20 50.70, 4.50 50.70, 4.50 50.90, 4.20 50.90, 4.20 50.70))', th3index '871fa44a8ffffff@2001-01-01'); -- true