Skip to main content
Returns the total number of rings in a Polygon or MultiPolygon. Compared to ST_NumInteriorRings, ST_NRings takes exterior rings into account as well. SQL reference: ST_NRings

Signature

Parameters

ColumnOrName
required
Geometry column to calculate rings for

Returns

Column
Number of exterior rings + interior rings (if any) for the given Polygon or MultiPolygon