Restrict to (the complement of) a value or a set of values
atValue({tpose,tposechain},{pose,posechain}) → {tpose,tposechain}
minusValue({tpose,tposechain},{pose,posechain}) → {tpose,tposechain}
atValues({tpose,tposechain},{poseset,posechainset}) → {tpose,tposechain}
minusValues({tpose,tposechain},{poseset,posechainset}) → {tpose,tposechain}
SELECT atValue(tpose '[Pose(Point(2 2), 0.3)@2001-01-01,
Pose(Point(2 2), 0.7)@2001-01-03]', 'Pose(Point(2 2), 0.5)');
-- {[Pose(POINT(2 2),0.5)@2001-01-02]}
SELECT minusValue(tpose '[Pose(Point(2 2), 0.3)@2001-01-01,
Pose(Point(2 2), 0.7)@2001-01-03]', 'Pose(Point(2 2), 0.5)');
/* {[Pose(Point(2 2),0.3)@2001-01-01, Pose(Point(2 2),0.5)@2001-01-02),
(Pose(Point(2 2),0.5)@2001-01-02, Pose(Point(2 2),0.7)@2001-01-03]} */
Restrict to (the complement of) a geometry
atGeometry(tpose,geometry) → tpose minusGeometry(tpose,geometry) → tpose
SELECT atGeometry(tpose '[Pose(Point(2 2), 0.3)@2001-01-01,
Pose(Point(2 2), 0.7)@2001-01-03]', 'Polygon((40 40,40 50,50 50,50 40,40 40))');
SELECT minusGeometry(tpose '[Pose(Point(2 2), 0.3)@2001-01-01,
Pose(Point(2 2), 0.7)@2001-01-03]', 'Polygon((40 40,40 50,50 50,50 40,40 40))');
/* {(Pose(Point(2 2),0.342593)@2001-01-01 05:06:40.364673,
Pose(Point(2 2),0.7)@2001-01-03]} */
Restrict to (the complement of) an elevation span
atElevation(tpose,floatspan) → tpose minusElevation(tpose,floatspan) → tpose
The elevation of a pose is the elevation of its position, so the restriction keeps the times at which that position lies within the span. The temporal pose must have Z dimension.
SELECT asText(atElevation(tpose '[Pose(Point(0 0 0),1,0,0,0)@2001-01-01,
Pose(Point(0 0 4),1,0,0,0)@2001-01-05]', floatspan '[1, 2]'));
/* {[Pose(POINT Z (0 0 1),1,0,0,0)@2001-01-02,
Pose(POINT Z (0 0 2),1,0,0,0)@2001-01-03]} */
SELECT asText(minusElevation(tpose '[Pose(Point(0 0 0),1,0,0,0)@2001-01-01,
Pose(Point(0 0 4),1,0,0,0)@2001-01-05]', floatspan '[1, 2]'));
/* {[Pose(POINT Z (0 0 0),1,0,0,0)@2001-01-01, Pose(POINT Z (0 0 1),1,0,0,0)@2001-01-02),
(Pose(POINT Z (0 0 2),1,0,0,0)@2001-01-03,
Pose(POINT Z (0 0 4),1,0,0,0)@2001-01-05]} */
Restrict a temporal pose chain to a time or to a value
atTime({tpose,tposechain},time) → {tpose,tposechain}
SELECT asEWKT(atTime(tposechain '[PoseChain(Pose(Point(1 1), 0.5))@2001-01-01,
PoseChain(Pose(Point(2 2), 0.5))@2001-01-03]', timestamptz '2001-01-02'));
-- PoseChain(Pose(POINT(1.5 1.5),0.5))@2001-01-02
SELECT asEWKT(atValue(tposechain '{PoseChain(Pose(Point(1 1), 0.5))@2001-01-01,
PoseChain(Pose(Point(2 2), 0.5))@2001-01-02}',
posechain 'PoseChain(Pose(Point(2 2), 0.5))'));
-- {PoseChain(Pose(POINT(2 2),0.5))@2001-01-02}