ST_ExteriorRing

Determine the exterior ring of a polygon geometry.

Syntax

ST_ExteriorRing(geo);
geo
The input polygon geometry.

Type: VARCHAR(ANY)

Returns

A value of type VARCHAR(64000) that contains a line geometry that describes the exterior ring of the input polygon, or NULL if the input polygon is empty.

Examples

SELECT inza..ST_AsText(inza..ST_ExteriorRing(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_ASTEXT
-----------
LINESTRING (0 0, 100 0, 100 100, 0 100, 0 0)
(1 row)