Temporal Point Clouds

Point Cloud Schemas

Static Point Clouds

Constructors

  • pcpoint: Build a 2D or 3D pcpoint directly from x/y(/z) coordinates

  • pcpoint: Build a pcpoint from the coordinates of every dimension of the schema

  • pcpatch: Build a pcpatch from the coordinates of its points, one point after another

  • pcpatch: Build a pcpatch from a variadic list of pcpoints sharing the same pcid

Accessors

  • pcid: Return the schema id of a pcpoint or pcpatch

  • getX, getY, getZ: Return a coordinate of a pcpoint, NULL if the dimension is absent from the schema

  • getDim: Return any named dimension of a pcpoint, NULL if the name is unknown for the schema

  • SRID: Return the spatial reference identifier (inherited from the schema)

  • geometry: Return the multipoint of the positions the points of a patch occupy

Point Cloud Sets

Constructors

  • set: Construct a set from an array of values, all of which must share the same pcid

Point Cloud Bounding Boxes

Constructors

Conversions

  • tpcbox: Convert a pcpoint to a degenerate (zero-extent) tpcbox; SRID and pcid come from the schema

  • tpcbox: Convert a pcpatch to a tpcbox

Accessors

Transformations

  • round: Return a tpcbox with coordinates rounded to a given number of decimal digits

  • setSRID: Return a tpcbox stating a reference system its schema does not state

Set Operations

  • +, *: Union and intersection of two tpcboxes

Topological Operations

Comparisons

  • =, <>, <, <=, >=, >: Compare two tpcboxes; total order over the canonical encoding (pcid, srid, flags, period, then spatial bounds in XYZ-min/max order)

Temporal Point Cloud Points

Input and Output

  • asText: Return the text representation of a tpcpoint, or of an array of them, and cast a tpcpoint to text

  • asMFJSON: Return the Moving Features JSON (MF-JSON) representation

Constructors

  • tpcpoint: Constructor for temporal point cloud points having a constant value

  • tpcpointSeq: Constructor for temporal point cloud points of sequence subtype

  • tpcpointSeqSet: Construct a temporal pcpoint of sequence-set subtype from an array of sequences

Conversions

  • ::: Convert a temporal point cloud point to a temporal geometry point

Accessors

  • pcid: Return the pgPointCloud schema id shared by all instants

  • SRID: Return the SRID inherited from the schema

  • getX, getY, getZ: Project a tpcpoint onto a spatial dimension, yielding a tfloat

  • getDim: Project a tpcpoint onto any named schema dimension, yielding a tfloat

Transformations

Modifications

Restrictions

Splitting Operations

  • unnest: Return the distinct values of a tpcpoint with the span set on which each of them is taken

  • timeSplit: Split a tpcpoint into fragments, one per time bin

  • spans: Return the array of time spans of a tpcpoint's segments

  • splitNSpans, splitEachNSpans: Return the time spans of a tpcpoint split into a given number of bins, or with a given number of segments per bin

Bounding Box Operations

Distance Operations

  • |=|: Return the smallest distance ever

  • nearestApproachInstant: Return the instant of the tpcpoint at which the two arguments are at the nearest distance

  • shortestLine: Return the line connecting the nearest approach point between the two arguments

  • <->: Return the temporal distance

Spatiotemporal Relationships

Comparisons

Temporal Point Cloud Patches

Input and Output

  • asText: Return the text representation of a tpcpatch, or of an array of them, and cast a tpcpatch to text

  • asMFJSON: Return the Moving Features JSON (MF-JSON) representation

Constructors

  • tpcpatch: Construct a temporal pcpatch of instant subtype

  • tpcpatchSeq: Construct a temporal pcpatch of sequence subtype

  • tpcpatchSeqSet: Construct a temporal pcpatch of sequence-set subtype

Conversions

  • tgeometry: Convert a temporal patch into the temporal geometry of the multipoints its patches occupy

Accessors

  • startNumPoints, endNumPoints: Return the number of points in the patch carried by the first or last instant

  • numPoints: Return the total number of points across every instant's patch

  • points: Set-returning function: emits one row per (instant timestamp, point) by walking each instant's patch and decomposing it through pgPointCloud's in-memory C API

Transformations

Modifications

Restrictions

Splitting Operations

  • unnest: Return the distinct values of a tpcpatch with the span set on which each of them is taken

  • timeSplit: Split a tpcpatch into fragments, one per time bin

  • spans: Return the array of time spans of a tpcpatch's segments

  • splitNSpans, splitEachNSpans: Return the time spans of a tpcpatch split into a given number of bins, or with a given number of segments per bin

Bounding Box Operations

Distance Operations

  • |=|: Return the smallest distance ever

Ever and Always Relationships

Spatiotemporal Relationships

Comparisons

  • ?=, %=: Ever and always comparisons

  • #=: Temporal comparisons

Aggregations

  • extent: Bounding-box aggregate over a column of tpcpoint, tpcpatch, or tpcbox values

  • tCount, wCount: Temporal count and window count of overlapping rows at each timestamp

  • tnpoints: Per-instant pcpatch point count, summed across rows

  • tdensity: Per-instant point density (numPoints / xy-bbox-area) summed across rows

  • merge, mergeAgg: Combine multiple temporal values into a single one with all input instants merged in temporal order

  • appendInstant, appendSequence, appendInstantAgg, appendSequenceAgg: Streaming construction aggregates: appendInstant assembles instants into a sequence; appendSequence assembles sequences into a sequence set

Indexes