This topic describes the ST_Points function. This function constructs a MultiPoint object that contains all vertexes of a geometry object.

Syntax

geometry  ST_Points(geometry  geom);

Parameters

Parameter Description
geom The geometry object that you want to specify.

Description

  • The ST_Points function does not remove the duplicate points in the geometry object. For example, the ST_Points function does not delete the start point and end point of a circular geometry object.

    You can use the ST_RemoveRepeatedPoints function to remove the duplicate points.

  • If the geometry object has m and z coordinates, the ST_Points function preserves the m and z coordinates.
  • The ST_Points function supports circular strings and curves.

Examples

Construct a MultiPoint object by using the default parameter settings.
SELECT ST_AsText(ST_Points('LINESTRING(0 0,2 2)'::geometry));
      st_astext
---------------------
 MULTIPOINT(0 0,2 2)
(1 row)