This topic describes the ST_Summary function. This function returns a text summary of an object.
Syntax
text ST_Summary(geometry g);
text ST_Summary(geography g);
Parameters
Parameter | Description |
g | The geometry object or geography object that you want to specify. |
Description
The parameters that are enclosed in a pair of square brackets ([]) following the geometry object or geography object have the following meanings:
M: The returned text summary contains m coordinates.
Z: The returned text summary contains z coordinates.
B: The returned text summary contains cached bounding boxes.
G: The object that you specify is a geography object.
S: The returned text summary contains the spatial reference system in which the geometry object or geography object resides.
This function supports circular strings, curves, polyhedral surfaces, triangles, triangulated irregular network (TIN) surfaces, and 3D objects.
NoteYou can use MULTIPOLYGON rather than POLYHEDRALSURFACE to create polyhedral surfaces. Example:
MULTIPOLYGON (((0 0 0, 1 0 0, 1 1 0, 0 1 0, 0 0 0)), ((1 0 0, 1 1 0, 1 1 1, 1 0 1, 1 0 0)), ((1 1 0, 0 1 0, 0 1 1, 1 1 1, 1 1 0)), ((0 1 0, 0 0 0, 0 0 1, 0 1 1, 0 1 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), ((0 0 1, 1 0 1, 1 1 1, 0 1 1, 0 0 1)))
.
Examples
Obtain a text summary by using the default parameter settings.
SELECT ST_Summary('MULTIPOLYGON(((1 0,0 3,3 0,1 0)),((1 0,2 0,0 2,1 0)))'::geometry);
st_summary
---------------------------------
MultiPolygon[B] with 2 elements+
Polygon[] with 1 rings +
ring 0 has 4 points +
Polygon[] with 1 rings +
ring 0 has 4 points
(1 row)