This topic describes the ST_MPointFromText function. This function constructs a MultiPoint object by using a Well-Known Text (WKT) string and a spatial reference identifier (SRID).

Syntax

geometry  ST_MPointFromText(text  wKT , integer  srid);
geometry  ST_MPointFromText(text  wKT);

Parameters

Parameter Description
wKT The WKT string that you want to specify.
srid The SRID of the MultiPoint object.

Description

  • If you can make sure that the information that you specify can be used to construct a MultiPoint object, we recommend that you use the ST_GeomFromText function, which constructs a geometry object at a higher speed because no unnecessary checks are required.
  • If you do not specify an SRID, the default SRID 0 is used.
  • If the WKT string that you specify does not represent a MultiPoint object, this function returns null.

Examples

SELECT ST_AsText(ST_MPointFromText('MULTIPOINT(1 2,3 4)'));
      st_astext
---------------------
 MULTIPOINT(1 2,3 4)
(1 row)