The temporal pose chain type tposechain represents the evolution in time of a chain of nested frames, that is, of an articulated object whose joints move with respect to one another. As all temporal types, it comes in three subtypes, namely, instant, sequence, and sequence set. Examples of tposechain values in these subtypes are given next.
Every value of a temporal pose chain holds the same number of links. A chain that gains a joint is a different structure rather than a later value of the same one, and that constant number is also what makes the interpolation below well defined. An error is raised otherwise.
A temporal pose chain interpolates link by link, each link as a pose does, that is, linearly in position and along the shortest arc in rotation. In the example below a two-link arm turns a quarter turn at its shoulder while its elbow stays where it is: halfway through, the shoulder has turned an eighth of a turn and the elbow is unchanged.
A pose chain has no distance function, since the distance between two articulated configurations is not defined by the standard the type follows. The temporal pose chain type therefore has neither the ever and always nor the spatiotemporal relationships, all of which are defined in terms of a distance.
The temporal pose type tpose allows to represent the evolution in time of the position of objects and their orientation. As all temporal types, it comes in three subtypes, namely, instant, sequence, and sequence set. Examples of tpose values in these subtypes are given next.
SELECT tpose 'Pose(Point(1 1), 0.5)@2001-01-01';
SELECT tpose '{Pose(Point(1 1), 0.3)@2001-01-01, Pose(Point(1 1), 0.5)@2001-01-02,
Pose(Point(1 1), 0.5)@2001-01-03}';
SELECT tpose '[Pose(Point(1 1), 0.2)@2001-01-01, Pose(Point(1 1), 0.4)@2001-01-02,
Pose(Point(1 1), 0.5)@2001-01-03]';
SELECT tpose '{[Pose(Point(1 1), 1)@2001-01-01, Pose(Point(2 2), 1)@2001-01-02],
[Pose(Point(2 2), 2)@2001-01-04, Pose(Point(2 2), 3)@2001-01-05]}';
As for temporal point types, the temporal pose and the temporal pose chain types accept type modifiers (or typmod in PostgreSQL terminology) to specify the subtype, the dimensionality of the point, and/or the spatial reference identifier (SRID). The possible values for the subtype are Instant, Sequence, and SequenceSet and the possible values for the geometry type are either Point or PointZ. The three arguments are optional and if any of them is not specified for a column, values of any subtype, dimensionality, and/or SRID are allowed.
SELECT asEWKT(tpose(Sequence,5676) 'SRID=5676; [Pose(Point(1 1), 0.2)@2001-01-01, Pose(Point(1 1), 0.5)@2001-01-03]'); -- SRID=5676;[Pose(POINT(1 1),0.2)@2001-01-01, Pose(POINT(1 1),0.5)@2001-01-03] SELECT tpose(Sequence) 'Pose(Point(1 1), 0.2)@2001-01-01'; -- ERROR: Temporal type (Instant) does not match column type (Sequence) SELECT tpose(PointZ) 'Pose(Point(1 1), 0.2)@2001-01-01'; -- Column has Z dimension but the tpose value does not SELECT tpose(5676) 'Pose(Point(1 1), 0.2)@2001-01-01'; -- ERROR: Temporal pose SRID (0) does not match column SRID (5676) SELECT asEWKT(tposechain(Sequence,5676) 'SRID=5676; [PoseChain(Pose(Point(1 1), 0.2))@2001-01-01, PoseChain(Pose(Point(1 1), 0.5))@2001-01-03]'); /* SRID=5676;[PoseChain(Pose(POINT(1 1),0.2))@2001-01-01, PoseChain(Pose(POINT(1 1),0.5))@2001-01-03] */
Temporal pose values of sequence or sequence set subtype are converted into a normal form so that equivalent values have identical representations. For this, consecutive instant values are merged when possible. Three consecutive instant values can be merged into two if the linear functions defining the evolution of values are the same. Examples of transformation into a normal form are as follows.
SELECT asText(tpose '[Pose(Point(1 1), 0.2)@2001-01-01, Pose(Point(2 2), 0.4)@2001-01-02,
Pose(Point(3 3), 0.6)@2001-01-03)');
-- [Pose(POINT(1 1),0.2)@2001-01-01, Pose(POINT(3 3),0.6)@2001-01-03)
SELECT asText(tpose '{[Pose(Point(1 1), 0.2)@2001-01-01, Pose(Point(2 2), 0.3)@2001-01-02,
Pose(Point(2 2), 0.5)@2001-01-03),
[Pose(Point(2 2), 0.5)@2001-01-03, Pose(Point(2 2), 0.7)@2001-01-04)}');
/* {[Pose(POINT(1 1),0.2)@2001-01-01, Pose(POINT(2 2),0.3)@2001-01-02,
Pose(POINT(2 2),0.7)@2001-01-04)} */