ST_InteriorRingN¶
Introduction: Returns the Nth interior linestring ring of the polygon geometry. Returns NULL if the geometry is not a polygon or the given N is out of range
Format: ST_InteriorRingN(geom: Geometry, n: Integer)
Since: v1.3.0
Example:
SELECT ST_InteriorRingN(ST_GeomFromText('POLYGON((0 0, 0 5, 5 5, 5 0, 0 0), (1 1, 2 1, 2 2, 1 2, 1 1), (1 3, 2 3, 2 4, 1 4, 1 3), (3 3, 4 3, 4 4, 3 4, 3 3))'), 0)
Output:
LINEARRING (1 1, 2 1, 2 2, 1 2, 1 1)