ST_NumInteriorRings

Introduction: RETURNS number of interior rings of polygon geometries.

ST_NumInteriorRings

Format: ST_NumInteriorRings(geom: Geometry)

Return type: Integer

Since: v1.0.0

SQL Example

SELECT ST_NumInteriorRings(ST_GeomFromText('POLYGON ((0 0, 0 5, 5 5, 5 0, 0 0), (1 1, 2 1, 2 2, 1 2, 1 1))'))

Output:

1