Name

ST_DumpRings — Returns a set of geometry rows, representing the exterior and interior rings of a Polygon or a MultiPolygon.

Synopsis

geometry[] ST_DumpRings(bytea Geometry);

Alias

DumpRings

Description

Returns a set of geometry rows, representing the exterior and interior rings of a Polygon or a MultiPolygon.

[Note]

This method supports GeometryCollections

[Caution]

JASPA ST_DumpRings function returns just an array of geometries.

PostGIS ST_DumpRings function creates an array of geometries with an array of integers (path).

Coordinate Dimensions
2D3DM
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006)SQL-MM Part 3
----

Examples

PostgreSQL
SELECT ST_astext(geom) as dumprings 
 FROM (SELECT ST_DumpRings(ST_GeomFromText('MULTIPOLYGON (((1 7, 1 1, 6 1, 7 7, 1 7), 
  (2 4, 2 2, 3 2, 3 4, 2 4)), ((6 9, 6 12, 9 12, 9 9, 6 9)))')) as geom
) as foo;

               dumprings
----------------------------------------
 LINESTRING (1 7, 1 1, 6 1, 7 7, 1 7)
 LINESTRING (2 4, 2 2, 3 2, 3 4, 2 4)
 LINESTRING (6 9, 6 12, 9 12, 9 9, 6 9)
H2
SELECT ST_AsText(rings.geom) as dumprings from (st_dumprings('select st_geomfromewkt(''MULTIPOLYGON (((1 7, 1 1, 6 1, 7 7, 1 7), 
  (2 4, 2 2, 3 2, 3 4, 2 4)), ((6 9, 6 12, 9 12, 9 9, 6 9)))'') as geom') as rings) ;

DUMPRINGS  
LINESTRING (1 7, 1 1, 6 1, 7 7, 1 7)
LINESTRING (2 4, 2 2, 3 2, 3 4, 2 4)
LINESTRING (6 9, 6 12, 9 12, 9 9, 6 9)
(3 filas, 4 ms)
GeomA
ST_DumpRings(GeomA)

Related functions

ST_Dump,ST_DumpPoints