A.3. Functions and Operators for Temporal Types

A.3.1. Constructor Functions

  • ttype_inst: Constructor for temporal types of instant subtype

  • ttype_instset: Constructor for temporal types of instant set subtype

  • ttype_seq: Constructor for temporal types of sequence subtype

  • ttype_seqset: Constructor for temporal types of sequence set subtype

A.3.2. Casting

A.3.3. Accessor Functions

A.3.4. Modification Functions

A.3.5. Restriction Functions

A.3.5.1. Selection Functions

A.3.5.2. Difference Functions

A.3.6. Comparison Operators

A.3.6.1. Traditional Comparison Operators

  • =: Are the temporal values equal?

  • <>: Are the temporal values different?

  • <: Is the first temporal value less than the second one?

  • >: Is the first temporal value greater than the second one?

  • <=: Is the first temporal value less than or equal to the second one?

  • >=: Is the first temporal value greater than or equal to the second one?

A.3.6.2. Ever and Always Comparison Operators

  • ?=: Is the temporal value ever equal to the value?

  • ?<>: Is the temporal value ever different from the value?

  • ?<: Is the temporal value ever less than the value?

  • ?>: Is the temporal value ever greater than the value?

  • ?<=: Is the temporal value ever less than or equal to the value?

  • ?>=: Is the temporal value ever greater than or equal to the value?

  • %=: Is the temporal value always equal to the value?

  • %<>: Is the temporal value always different to the value?

  • %<: Is the temporal value always less than the value?

  • %>: Is the temporal value always greater than the value?

  • %<=: Is the temporal value always less than or equal to the value?

  • %>=: Is the temporal value always greater than or equal to the value?

A.3.6.3. Temporal Comparison Operators

  • #=: Temporal equal

  • #<>: Temporal different

  • #<: Temporal less than

  • #>: Temporal greater than

  • #<=: Temporal less than or equal to

  • #>=: Temporal greater than or equal to

A.3.7. Mathematical Functions and Operators

  • +: Temporal addition

  • -: Temporal subtraction

  • *: Temporal multiplication

  • /: Temporal division

  • round: Round the values to a number of decimal places

  • degrees: Convert from radians to degrees

  • derivative: Get the derivative over time of the temporal float in units per second

A.3.8. Boolean Operators

  • &: Temporal and

  • |: Temporal or

  • ~: Temporal not

A.3.9. Text Functions and Operators

  • ||: Temporal text concatenation

  • upper: Transform to uppercase

  • lower: Transform to lowercase

A.3.10. Spatial Functions and Operators

A.3.10.1. Input/Output Functions

  • asText: Get the Well-Known Text (WKT) representation

  • asEWKT: Get the Extended Well-Known Text (EWKT) representation

  • asMFJSON: Get the Moving Features JSON representation

  • asBinary: Get the Well-Known Binary (WKB) representation

  • asEWKB: Get the Extended Well-Known Binary (EWKB) representation

  • asHexEWKB: Get the Hexadecimal Extended Well-Known Binary (EWKB) representation as text

  • tgeompointFromText: Input a temporal geometry point from a Well-Known Text (WKT) representation

  • tgeogpointFromText: Input a temporal geography point from a Well-Known Text (WKT) representation

  • tgeompointFromEWKT: Input a temporal geometry point from an Extended Well-Known Text (EWKT) representation

  • tgeogpointFromEWKT: Input a temporal geography point from an Extended Well-Known Text (EWKT) representation

  • tgeompointFromMFJSON: Input a temporal geometry point from a Moving Features JSON representation

  • tgeogpointFromMFJSON: Input a temporal geography geometry point from a Moving Features JSON representation

  • tgeompointFromBinary: Input a temporal geometry point from a Well-Known Binary (WKB) representation

  • tgeogpointFromBinary: Input a temporal geography point from a Well-Known Binary (WKB) representation

  • tgeompointFromEWKB: Input a temporal geometry point from an Extended Well-Known Binary (EWKB) representation

  • tgeogpointFromEWKB: Input a temporal geography point from an Extended Well-Known Binary (EWKB) representation

  • tgeompointFromHexEWKB: Input a temporal geometry point from an Hexadecimal Extended Well-Known Binary (EWKB) representation as text

  • tgeogpointFromHexEWKB: Input a temporal geography point from an Hexadecimal Extended Well-Known Binary (EWKB) representation as text

A.3.10.2. Spatial Reference System Functions

  • SRID: Get the spatial reference identifier

  • setSRID: Set the spatial reference identifier

  • transform: Transform to a different spatial reference

A.3.10.3. Accessor Functions

  • getX: Get the X coordinate values as a temporal float

  • getY: Get the Y coordinate values as a temporal float

  • getZ: Get the Z coordinate values as a temporal float

  • length: Get the length traversed by the temporal point

  • isSimple: Returns true if the temporal point does not spatially self-intersect

  • cumulativeLength: Get the cumulative length traversed by the temporal point

  • speed: Get the speed of the temporal point in units per second

  • twCentroid: Get the time-weighted centroid

  • azimuth: Get the temporal azimuth

  • bearing: Get the temporal bearing

A.3.10.4. Manipulation Functions

  • round: Round the coordinate values to a number of decimal places

  • makeSimple: Returns an array of fragments of the temporal point which are simple

  • simplify: Simplify a temporal point using a generalization of the Douglas-Peucker algorithm

  • geoMeasure: Construct a geometry/geography with M measure from a temporal point and a temporal float

  • asMVTGeom: Transform a temporal geometric point into the coordinate space of a Mapbox Vector Tile

A.3.10.5. Distance Functions and Operators

  • |=|: Get the smallest distance ever

  • nearestApproachInstant: Get the instant of the first temporal point at which the two arguments are at the nearest distance

  • shortestLine: Get the line connecting the nearest approach point

  • <->: Get the temporal distance

A.3.10.6. Possible Spatial Relationships

A.3.10.7. Temporal Spatial Relationships

A.3.11. Similarity Functions

  • frechetDistance: Get the discrete Fréchet distance between two temporal values

  • frechetDistancePath: Get the correspondence pairs between two temporal values with respect to the discrete Fréchet distance

  • dynamicTimeWarp: Get the Dynamic Time Warp distance between two temporal values

  • dynamicTimeWarpPath: Get the correspondence pairs between two temporal values with respect to the Dynamic Time Warp distance

A.3.12. Multidimensional Tiling

A.3.12.1. Bucket Functions

  • bucketList: Returns a set of couples (index, bucket) that cover the range or period with buckets of the same width or duration aligned with the origin

  • valueBucket: Returns the start value of the bucket that contains the input number.

  • rangeBucket: Returns the range in the bucket space that contains the input number

  • timeBucket: Returns the start timestamp of the bucket that contains the input timestamp.

  • periodBucket: Returns a period in the bucket space that contains the input timestamp

A.3.12.2. Grid Functions

  • multidimGrid: Returns a set of couples (index, tile) that covers the box with multidimensional tiles of the same size and duration.

  • multidimTile: Returns the tile of the multidimensional grid that contains the value and the timestamp

A.3.12.3. Split Functions

  • valueSplit: Fragment the temporal number with respect to value buckets

  • timeSplit: Fragment the temporal value with respect to time buckets

  • valueTimeSplit: Fragment the temporal number with respect to the tiles in a value-time grid

  • spaceSplit: Fragment the temporal point with respect to tiles in a spatial grid

  • spaceTimeSplit: Fragment the temporal point with respect to tiles in a spatiotemporal grid

A.3.13. Aggregate Functions

A.3.14. Utility Functions