ST_NumInteriorRings
Returns the count of interior rings in a Polygon. This function calculates the total number of inner holes within the polygon.
Syntax
ST_NumInteriorRings(poly)
NumInteriorRings(poly)Description
Examples
SET @poly = 'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))';
SELECT NumInteriorRings(GeomFromText(@poly));
+---------------------------------------+
| NumInteriorRings(GeomFromText(@poly)) |
+---------------------------------------+
| 1 |
+---------------------------------------+Last updated
Was this helpful?

