Skip to content

ST_MPointFromText

Constructs a MultiPoint from Well-Known Text (WKT), erroring if the input is not a MultiPoint.

Usage

geometry ST_MPointFromText(wkt: string)
geometry ST_MPointFromText(wkt: string, srid: crs)

Arguments

  • wkt (string)
  • srid (crs)

Description

Parses a WKT string and returns a geometry. Raises an error if the WKT does not represent a MultiPoint.

Examples

SELECT ST_MPointFromText('MULTIPOINT ((0 0), (1 1), (2 2))');
┌─────────────────────────────────────────────────────────────┐
│ st_mpointfromtext(Utf8("MULTIPOINT ((0 0), (1 1), (2 2))")) │
│                           geometry                          │
╞═════════════════════════════════════════════════════════════╡
│ MULTIPOINT((0 0),(1 1),(2 2))                               │
└─────────────────────────────────────────────────────────────┘

With an SRID or CRS:

SELECT ST_MPointFromText('MULTIPOINT ((0 0), (1 1), (2 2))', 4326);
┌─────────────────────────────────────────────────────────────────────────┐
│ st_mpointfromtext(Utf8("MULTIPOINT ((0 0), (1 1), (2 2))"),Int64(4326)) │
│                                 geometry                                │
╞═════════════════════════════════════════════════════════════════════════╡
│ MULTIPOINT((0 0),(1 1),(2 2))                                           │
└─────────────────────────────────────────────────────────────────────────┘