ST_NumInteriorRing
Determines the number of interior rings of the polygon.
Syntax
ST_NumInteriorRing(geo);
- geo
- The input geometry.
Type: ST_GEOMETRY(ANY)
Returns
A value of type INT4 that represents the number of interior rings of the polygon.
Examples
SELECT inza..ST_NumInteriorRing(inza..ST_WKTToSQL('POLYGON ((0 0, 100 0, 100 100, 0 100, 0 0),
(10 10, 10 20, 20 20, 20 15, 10 10))'));
ST_NUMINTERIORRING
--------------------
1
(1 row)
SELECT inza..ST_NumInteriorRing(inza..ST_WKTToSQL('POLYGON ((0 0, 100 0, 100 100, 0 100, 0 0))'));
ST_NUMINTERIORRING
--------------------
0
(1 row)
SELECT inza..ST_NumInteriorRing(inza..ST_WKTToSQL('POLYGON EMPTY'));
ST_NUMINTERIORRING
--------------------
0
(1 row)