Skip to content
Apache Sedona 1.9.0 is out now, featuring Spark 4.1 support, proj4sedona CRS transformation, Bing Tile functions, and more!

ST_NumInteriorRing

Introduction: Returns number of interior rings of polygon geometries. It is an alias of ST_NumInteriorRings.

ST_NumInteriorRing

Format: ST_NumInteriorRing(geom: Geometry)

Return type: Integer

Since: v1.6.1

SQL Example

SELECT ST_NumInteriorRing(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