Ever or always contains
eContains({geometry,tgeom},{geometry,tgeom}) → boolean
aContains({geometry,tgeom},{geometry,tgeom}) → boolean
This function returns true if the temporal geometry and the geometry ever or always intersect at their interior. Recall that a geometry does not contain things in its boundary and thus, polygons and lines do not contain lines and points lying in their boundary. Please refer to the documentation of the ST_Contains function in PostGIS.
SELECT eContains(geometry 'Linestring(1 1,3 3)', tgeompoint '[Point(4 2)@2001-01-01, Point(2 4)@2001-01-02]'); -- false SELECT eContains(geometry 'Linestring(1 1,3 3,1 1)', tgeompoint '[Point(4 2)@2001-01-01, Point(2 4)@2001-01-03]'); -- true SELECT eContains(geometry 'Polygon((1 1,1 3,3 3,3 1,1 1))', tgeompoint '[Point(0 1)@2001-01-01, Point(4 1)@2001-01-02]'); -- false SELECT eContains(geometry 'Polygon((1 1,1 3,3 3,3 1,1 1))', tgeometry '[Linestring(1 1,4 4)@2001-01-01, Point(3 3)@2001-01-04]'); -- true
Ever or always covers
eCovers({geometry,tgeom},{geometry,tgeom}) → boolean
aCovers({geometry,tgeom},{geometry,tgeom}) → boolean
Please refer to the documentation of the ST_Contains and the ST_Covers function in PostGIS for detailed explanations about the difference between the two functions.
SELECT eCovers(geometry 'Linestring(1 1,3 3)', tgeompoint '[Point(4 2)@2001-01-01, Point(2 4)@2001-01-02]'); -- false SELECT eCovers(geometry 'Linestring(1 1,3 3,1 1)', tgeompoint '[Point(4 2)@2001-01-01, Point(2 4)@2001-01-03]'); -- true SELECT eCovers(geometry 'Polygon((1 1,1 3,3 3,3 1,1 1))', tgeompoint '[Point(0 1)@2001-01-01, Point(4 1)@2001-01-02]'); -- false SELECT eCovers(geometry 'Polygon((1 1,1 3,3 3,3 1,1 1))', tgeometry '[Linestring(1 1,4 4)@2001-01-01, Point(3 3)@2001-01-04]'); -- true
Is ever or always disjoint
eDisjoint({geo,tgeo},{geo,tgeo}) → boolean
aDisjoint({geo,tgeo},{geo,tgeo}) → boolean
SELECT eDisjoint(geometry 'Polygon((0 0,0 1,1 1,1 0,0 0))', tgeompoint '[Point(0 0)@2001-01-01, Point(1 1)@2001-01-03)'); -- false SELECT eDisjoint(geometry 'Polygon((0 0 0,0 1 1,1 1 1,1 0 0,0 0 0))', tgeometry '[Linestring(1 1 1,2 2 2)@2001-01-01, Point(2 2 2)@2001-01-03]'); -- true
Is ever or always at distance within
eDwithin({geo,tgeo},{geo,tgeo},float) → boolean
aDwithin({geometry,tgeom},{geometry,tgeom},float) → boolean
SELECT eDwithin(geometry 'Point(1 1 1)', tgeompoint '[Point(0 0 0)@2001-01-01, Point(1 1 0)@2001-01-02]', 1); -- true SELECT eDwithin(geometry 'Polygon((0 0 0,0 1 1,1 1 1,1 0 0,0 0 0))', tgeompoint '[Point(0 2 2)@2001-01-01,Point(2 2 2)@2001-01-02]', 1); -- false
Ever or always intersects
eIntersects({geo,tgeo},{geo,tgeo}) → boolean
aIntersects({geometry,tgeom},{geometry,tgeom}) → boolean
SELECT eIntersects(geometry 'Polygon((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))', tgeompoint '[Point(0 0 1)@2001-01-01, Point(1 1 1)@2001-01-03)'); -- false SELECT eIntersects(geometry 'Polygon((0 0 0,0 1 1,1 1 1,1 0 0,0 0 0))', tgeompoint '[Point(0 0 1)@2001-01-01, Point(1 1 1)@2001-01-03)'); -- true
Ever or always touches
eTouches({geometry,tgeom},{geometry,tgeom}) → boolean
aTouches({geometry,tgeom},{geometry,tgeom}) → boolean
SELECT eTouches(geometry 'Polygon((0 0,0 1,1 1,1 0,0 0))', tgeompoint '[Point(0 0)@2001-01-01, Point(0 1)@2001-01-03)'); -- true