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
| Parameter | Description |
|---|---|
pc | The pcpatch object to summarize. |
Return value
A text value containing a JSON object with the following fields:
| Field | Description |
|---|---|
pcid | Point cloud schema ID. Identifies the schema that defines the dimensions of the patch. |
npts | Number of points in the patch. |
srid | Spatial reference system ID (SRID) of the patch coordinates. |
compr | Patch-level compression algorithm. |
dims | Array of dimension descriptors. Each element describes one dimension in the point cloud schema. |
dims[].pos | Zero-based position index of the dimension within the schema. |
dims[].name | Name of the dimension, such as X, Y, Z, or Intensity. |
dims[].size | Storage size of the dimension in bytes. |
dims[].type | C data type used to store dimension values, such as int32_t or uint16_t. |
dims[].compr | Dimension-level compression algorithm. |
dims[].stats.min | Minimum value of the dimension across all points in the patch. |
dims[].stats.max | Maximum value of the dimension across all points in the patch. |
dims[].stats.avg | Average 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.