All Products
Search
Document Center

PolarDB:ST_summary

Last Updated:Mar 28, 2026

Returns a JSON-formatted summary of the metadata in a pcpatch object, including the point cloud schema, point count, spatial reference, compression method, and per-dimension statistics.

Syntax

text ST_summary(pcpatch pc);

Parameters

ParameterDescription
pcThe pcpatch object to summarize.

Return value

A text value containing a JSON object with the following fields:

FieldDescription
pcidPoint cloud schema ID. Identifies the schema that defines the dimensions of the patch.
nptsNumber of points in the patch.
sridSpatial reference system ID (SRID) of the patch coordinates.
comprPatch-level compression algorithm.
dimsArray of dimension descriptors. Each element describes one dimension in the point cloud schema.
dims[].posZero-based position index of the dimension within the schema.
dims[].nameName of the dimension, such as X, Y, Z, or Intensity.
dims[].sizeStorage size of the dimension in bytes.
dims[].typeC data type used to store dimension values, such as int32_t or uint16_t.
dims[].comprDimension-level compression algorithm.
dims[].stats.minMinimum value of the dimension across all points in the patch.
dims[].stats.maxMaximum value of the dimension across all points in the patch.
dims[].stats.avgAverage value of the dimension across all points in the patch.

Example

Query the summary of the first patch in the patches table:

SELECT ST_Summary(pa) FROM patches LIMIT 1;

Output:

{
  "pcid": 1,
  "npts": 9,
  "srid": 4326,
  "compr": "dimensional",
  "dims": [
    {
      "pos": 0, "name": "X", "size": 4, "type": "int32_t", "compr": "sigbits",
      "stats": {"min": -126.99, "max": -126.91, "avg": -126.95}
    },
    {
      "pos": 1, "name": "Y", "size": 4, "type": "int32_t", "compr": "sigbits",
      "stats": {"min": 45.01, "max": 45.09, "avg": 45.05}
    },
    {
      "pos": 2, "name": "Z", "size": 4, "type": "int32_t", "compr": "sigbits",
      "stats": {"min": 1, "max": 9, "avg": 5}
    },
    {
      "pos": 3, "name": "Intensity", "size": 2, "type": "uint16_t", "compr": "rle",
      "stats": {"min": 0, "max": 0, "avg": 0}
    }
  ]
}

This patch contains 9 points with schema ID 1 (SRID 4326). The patch uses dimensional compression overall. Each dimension records its own compression method and min/max/avg statistics.