Point Cloud Sets

A pcpointset is an ordered set of distinct pcpoint values; a pcpatchset is the analogous set type for pcpatch. Both follow MobilityDB's general set semantics (see Chapter 2, Set and Span Types): values are deduplicated on construction, the binary representation is canonical, and all generic set-level operators (=, <>, <, <=, >, >=, @>, <@, &&, +, -, *) and accessors (numValues, memSize, asText, asBinary, asEWKB, asHexWKB, asHexEWKB, …) are available (see the binary representations of a spatial set). The pcid schema, and its SRID, is resolved out-of-band from the pointcloud_formats catalog rather than embedded in the value, so asBinary/asEWKB and asHexWKB/asHexEWKB return the same bytes for both set types.

All values in a set must share the same pcid. Mixing schemas in a single set raises an error at construction time.

Constructors

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

    set(pcpoint[]) → pcpointset
    set(pcpatch[]) → pcpatchset
    
    SELECT numValues(set(ARRAY[pcpoint(1, 10.0, 20.0, 30.0),
      pcpoint(1, 10.0, 20.0, 30.0),  -- duplicate, deduped
      pcpoint(1, 11.0, 21.0, 31.0)]));
    -- 2