Name

ST_DumpPoints — Returns the set of points that compose a Geometry.

Synopsis

geometry[] ST_DumpPoints(bytea Geometry);

Alias

DumpPoints

Description

Returns the set of points that compose a Geometry. It includes points, lines vertices and polygons vertices.

[Note]

GeometryCollections are supported.

[Caution]

JASPA ST_DumpPoints function returns just an array of geometries.

PostGIS ST_DumpPoints 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(g) 
 FROM (SELECT ST_DumpPoints(
st_geomfromtext('GEOMETRYCOLLECTION (POINT (2 2), POINT(5 3), POINT (6 5),POLYGON ((3 4, 3.2 6, 2.8 7.4, 5.1 7.1, 4.4 4.5, 3 4)))')
) as g) as foo;

    st_astext
-----------------
 POINT (2 2)
 POINT (5 3)
 POINT (6 5)
 POINT (3 4)
 POINT (3.2 6)
 POINT (2.8 7.4)
 POINT (5.1 7.1)
 POINT (4.4 4.5)
 POINT (3 4)
H2
SELECT ST_AsText(geom) from st_dumppoints('select st_geomfromewkt(''GEOMETRYCOLLECTION (POINT (2 2), POINT(5 3), POINT (6 5),
 POLYGON ((3 4, 3.2 6, 2.8 7.4, 5.1 7.1, 4.4 4.5, 3 4)))'') as geom') ;

-- Result
JASPA.ST_ASTEXT(GEOM)  
POINT (2 2)
POINT (5 3)
POINT (6 5)
POINT (3 4)
POINT (3.2 6)
POINT (2.8 7.4)
POINT (5.1 7.1)
POINT (4.4 4.5)
POINT (3 4)
(9 filas, 4 ms)
GeomA
ST_DumpPoints(GeomA)

Related functions

ST_Dump,ST_DumpRings