Functions / PostGIS / ST_Summary
PostGISGeometry Accessors

ST_Summary

What is ST_Summary?

ST_Summary is a PostGIS function that returns a human-readable multi-line text summary of a geometry — listing type, dimension, SRID, vertex count, bounding box, and M/Z flags.

SQL
1ST_Summary(geometry g)text
2ST_Summary(geography g)text

Intended for diagnostics rather than parsing. The exact format may change between PostGIS versions.

When would you use ST_Summary?

Use ST_Summary for quick ad-hoc inspection at the psql prompt or in troubleshooting queries — it is a one-call overview of everything structural about a geometry:

SQL
1SELECT ST_Summary(geom)
2FROM parcels
3WHERE id = 12345;

Useful when debugging unexpected behaviour: mixed SRIDs, missing Z dimensions, unexpectedly high vertex counts, or collection types where you expected simple geometries.

FAQs

Should I parse ST_Summary output?

No — use the specific accessor functions (ST_GeometryType, ST_NPoints, ST_SRID, ST_NDims, ST_Zmflag, etc.) for programmatic access. ST_Summary is for humans.

Does ST_Summary work on geography?

Yes — there is a geography overload that reports the same summary fields.

Can I use ST_Summary for bulk diagnostics?

You can, but formatted text is cumbersome to analyze in SQL. For bulk audits, compose specific accessors into a single SELECT with named columns.

What fields does ST_Summary show?

Typically type, dimensionality flags (2D/3DZ/3DM/4D), SRID, bbox presence, vertex count, ring count, and part count — varies by version and geometry type.