ST_Points¶
Returns a MultiPoint geometry consisting of all the coordinates of the input geometry or geography.
Usage¶
geometry ST_Points(geom: geometry)
geography ST_Points(geog: geography)
Arguments¶
- geog (geography): Input geography
- geom (geometry): Input geometry
Description¶
Returns a MultiPoint geometry consisting of all the coordinates of the input geometry. It preserves duplicate points as well as M and Z coordinates.
Examples¶
SELECT ST_Points(ST_GeomFromText('LINESTRING (2 4, 3 3, 4 2)'));
┌────────────────────────────────────────────────────────────────┐
│ st_points(st_geomfromtext(Utf8("LINESTRING (2 4, 3 3, 4 2)"))) │
│ geometry │
╞════════════════════════════════════════════════════════════════╡
│ MULTIPOINT((2 4),(3 3),(4 2)) │
└────────────────────────────────────────────────────────────────┘
SELECT ST_Points(ST_GeogFromWKT('LINESTRING (2 4, 3 3, 4 2)'));
┌───────────────────────────────────────────────────────────────┐
│ st_points(st_geogfromwkt(Utf8("LINESTRING (2 4, 3 3, 4 2)"))) │
│ geography │
╞═══════════════════════════════════════════════════════════════╡
│ MULTIPOINT((2 4),(3 3),(4 2)) │
└───────────────────────────────────────────────────────────────┘