Return a temporal pose simplified ensuring that consecutive points are at least a certain distance or time interval apart
minDistSimplify(tpose,mindist float) → tpose minTimeDeltaSimplify(tpose,mint interval) → tpose
The simplification operates on the trajectory of the points of the temporal pose and preserves the orientation at each surviving instant. Simplification applies only to temporal sequences or sequence sets with linear interpolation. In all other cases, a copy of the given value is returned.
SELECT asText(minDistSimplify(tpose '[Pose(Point(1 1), 0)@2001-01-01, Pose(Point(2 2), 0)@2001-01-02, Pose(Point(3 3), 0)@2001-01-03]', 2)); -- [Pose(POINT(1 1),0)@2001-01-01, Pose(POINT(3 3),0)@2001-01-03] SELECT asText(minTimeDeltaSimplify(tpose '[Pose(Point(1 1), 0)@2001-01-01, Pose(Point(2 2), 0)@2001-01-02, Pose(Point(3 3), 0)@2001-01-04]', interval '2 days')); -- [Pose(POINT(1 1),0)@2001-01-01, Pose(POINT(3 3),0)@2001-01-04]
Return a temporal pose simplified using the Douglas-Peucker algorithm
maxDistSimplify(tpose,maxdist float,syncdist bool=true) → tpose douglasPeuckerSimplify(tpose,maxdist float,syncdist bool=true) → tpose
The syncdist argument states whether the distance is measured between synchronized instants; when it is false the distance is the spatial one, ignoring time.
SELECT asText(maxDistSimplify(tpose '[Pose(Point(1 1), 0)@2001-01-01, Pose(Point(2 1), 0)@2001-01-02, Pose(Point(3 3), 0)@2001-01-03]', 1)); -- [Pose(POINT(1 1),0)@2001-01-01, Pose(POINT(3 3),0)@2001-01-03] SELECT asText(douglasPeuckerSimplify(tpose '[Pose(Point(1 1), 0)@2001-01-01, Pose(Point(2 1), 0)@2001-01-02, Pose(Point(3 3), 0)@2001-01-03]', 1)); -- [Pose(POINT(1 1),0)@2001-01-01, Pose(POINT(3 3),0)@2001-01-03]