ST_DumpRings — Returns a set of geometry rows, representing the exterior and interior rings of a Polygon or a MultiPolygon.
geometry[] ST_DumpRings(
bytea
Geometry)
;
Returns a set of geometry rows, representing the exterior and interior rings of a Polygon or a MultiPolygon.
This method supports GeometryCollections |
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). |
2D | 3D | M |
---|---|---|
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 |
---|---|---|---|
- | - | - | - |
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)
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) |