Temporal Point Clouds

Point Cloud Schemas

Static Point Clouds

Input and Output

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

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

  • transform: Transform to the schema of another pcid

  • numPoints: Return the number of points of a pcpatch

  • pointN: Return the n-th point of a pcpatch

  • 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

Input and Output

  • asBinary, asHexWKB: Return the Well-Known Binary (WKB) or the Hexadecimal Well-Known Binary (HexWKB) representation of a point cloud box

  • asEWKB, asHexEWKB: Return the Extended Well-Known Binary (EWKB) or the Hexadecimal Extended Well-Known Binary (HexEWKB) representation of a point cloud box

  • tpcboxFromBinary, tpcboxFromHexWKB: Input of a point cloud box from the Well-Known Binary (WKB) or the Hexadecimal Well-Known Binary (HexWKB) representation

  • tpcboxFromEWKB, tpcboxFromHexEWKB: Input of a point cloud box from the Extended Well-Known Binary (EWKB) or the Hexadecimal Extended Well-Known Binary (HexEWKB) representation

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

  • asEWKT: Return the Extended Well-Known Text (EWKT) representation of a point cloud box

  • tpcboxFromText: Input from the Well-Known Text (WKT) representation

  • tpcboxFromEWKT: Input of a point cloud box from the Extended Well-Known Text (EWKT) representation

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

  • transform: Transform to the schema of another pcid

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

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

  • tpcbox, ::: Convert a temporal point cloud point to its bounding box

Accessors

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

  • SRID: Return the SRID inherited from the schema

  • transform: Transform to the schema of another pcid

  • 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

  • tpcboxes: Return the array of point cloud boxes of the instants or segments of a tpcpoint

  • 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

  • mergeNSpans, mergeEachNSpans: Return the time spans of a tpcpoint merged into a given number of spans, or until a span holds on average a given number of segments, each time the consecutive pair whose union adds the least size to theirs

  • splitNTpcboxes, splitEachNTpcboxes: Return the point cloud boxes of a tpcpoint split into a given number of bins, or with a given number of instants or segments per bin

  • mergeNTpcboxes, mergeEachNTpcboxes: Return the point cloud boxes of a tpcpoint merged into a given number of boxes, or until a box holds on average a given number of instants or segments, each time the consecutive pair whose union adds the least size to theirs

  • mergeQueryTpcboxes, mergeQuerySpans: Return the point cloud boxes or the time spans of a tpcpoint merged into those a query of the extents of a query box is expected to read least: the widths of the query box are the extents of a query, its position is not read, and a dimension it lacks restricts no query

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

Simplification

Temporal Point Cloud Patches

Input and Output

Constructors

  • tpcpatch: Constructor for temporal point cloud patches having a constant value

  • 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

  • tpcbox, ::: Convert a temporal point cloud patch to its bounding box

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

  • tpcboxes: Return the array of point cloud boxes of the instants or segments of a tpcpatch

  • 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

  • mergeNSpans, mergeEachNSpans: Return the time spans of a tpcpatch merged into a given number of spans, or until a span holds on average a given number of segments, each time the consecutive pair whose union adds the least size to theirs

  • splitNTpcboxes, splitEachNTpcboxes: Return the point cloud boxes of a tpcpatch split into a given number of bins, or with a given number of instants or segments per bin

  • mergeNTpcboxes, mergeEachNTpcboxes: Return the point cloud boxes of a tpcpatch merged into a given number of boxes, or until a box holds on average a given number of instants or segments, each time the consecutive pair whose union adds the least size to theirs

  • mergeQueryTpcboxes, mergeQuerySpans: Return the point cloud boxes or the time spans of a tpcpatch merged into those a query of the extents of a query box is expected to read least: the widths of the query box are the extents of a query, its position is not read, and a dimension it lacks restricts no query

Spatial Operations

  • swath: Return the swath of a temporal patch, the region of the plane its patches sweep

Bounding Box Operations

Distance Operations

  • |=|: Return the smallest distance ever

Ever and Always Relationships

Spatiotemporal Relationships

Comparisons

  • ?=, %=: Ever and always comparisons

  • ?&&, %&&: Ever and always overlaps

  • #=: 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: Combine multiple temporal values into a single one with all input instants merged in temporal order

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

Indexes