Returns a text summary of a geometry object or geography object.
Syntax
text ST_Summary(geometry g);
text ST_Summary(geography g);Parameters
| Parameter | Description |
|---|---|
g | The geometry object or geography object. |
Output flags
The text summary includes a set of flags in square brackets after the geometry type name. Each flag indicates a property of the input object:
| Flag | Meaning |
|---|---|
M | The summary contains m coordinates. |
Z | The summary contains z coordinates. |
B | The summary contains cached bounding boxes. |
G | The input is a geography object. |
S | The summary contains the spatial reference system in which the object resides. |
Usage notes
ST_Summary supports circular strings, curves, polyhedral surfaces, triangles, triangulated irregular network (TIN) surfaces, and 3D objects.
Examples
Get a summary of a geometry object
The following example returns the text summary of a MultiPolygon with two Polygon elements. The [B] flag indicates that the object has a cached bounding box.
SELECT ST_Summary('MULTIPOLYGON(((1 0,0 3,3 0,1 0)),((1 0,2 0,0 2,1 0)))'::geometry);Output:
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)该文章对您有帮助吗?