The atGeometry, minusGeometry, atStbox, and minusStbox functions restrict a trgeometry to (the complement of) a geometry or a spatiotemporal box. The semantic mirrors tpose: a temporal rigid geometry is "in" a region at time t iff its centroid (antenna) at t lies in that region.
Restrict a trgeometry to (the complement of) a geometry
atGeometry(trgeometry, geometry) → trgeometry
minusGeometry(trgeometry, geometry) → trgeometry
SELECT temporalTime(atGeometry(
trgeometry 'Polygon((0 0,1 0,1 1,0 1,0 0));[Pose(Point(0 0), 0.0)@2001-01-01, Pose(Point(4 0), 0.0)@2001-01-05]',
geometry 'Polygon((1 -1,3 -1,3 1,1 1,1 -1))'));
-- {[2001-01-02, 2001-01-04]}
SELECT temporalTime(minusGeometry(
trgeometry 'Polygon((0 0,1 0,1 1,0 1,0 0));[Pose(Point(0 0), 0.0)@2001-01-01, Pose(Point(4 0), 0.0)@2001-01-05]',
geometry 'Polygon((1 -1,3 -1,3 1,1 1,1 -1))'));
-- {[2001-01-01, 2001-01-02), (2001-01-04, 2001-01-05]}
Restriction against an empty geometry returns NULL for atGeometry and the original input for minusGeometry.
Restrict a trgeometry to (the complement of) a spatiotemporal box
atStbox(trgeometry, stbox [, border_inc boolean = true]) → trgeometry
minusStbox(trgeometry, stbox [, border_inc boolean = true]) → trgeometry
SELECT temporalTime(atStbox(
trgeometry 'Polygon((0 0,1 0,1 1,0 1,0 0));[Pose(Point(0 0), 0.0)@2001-01-01, Pose(Point(4 0), 0.0)@2001-01-05]',
stbox 'STBOX X((1, -1), (3, 1))'));
-- {[2001-01-02, 2001-01-04]}
SELECT temporalTime(atStbox(
trgeometry 'Polygon((0 0,1 0,1 1,0 1,0 0));[Pose(Point(0 0), 0.0)@2001-01-01, Pose(Point(4 0), 0.0)@2001-01-05]',
stbox 'STBOX T([2001-01-02, 2001-01-04])'));
-- {[2001-01-02, 2001-01-04]}
If the STBox has only a temporal component the call collapses to the standard atTime; if it has only a spatial component the temporal domain is preserved.