PostGISGeometry Input

ST_MPointFromText

What is ST_MPointFromText?

ST_MPointFromText parses a MULTIPOINT WKT string and returns the geometry. Other geometry types raise an error.

SQL
1ST_MPointFromText(text WKT)geometry
2ST_MPointFromText(text WKT, integer srid)geometry

When would you use ST_MPointFromText?

Use ST_MPointFromText for point-cloud-like inputs where each record is a set of points — for instance, feature observation events grouped by session, or multiple GPS fixes delivered as a single record.

For scalar point inputs use ST_PointFromText; for mixed-type WKT inputs use the polymorphic ST_GeomFromText.

FAQs

What if the WKT is a plain Point?

An error. Wrap a single point with ST_Multi(ST_PointFromText(...)) or use ST_GeomFromText.

Is SRID required?

No. Defaults to 0.

What is the WKT format for MultiPoint?

MULTIPOINT((1 2), (3 4)) or the compact MULTIPOINT(1 2, 3 4). Both are accepted.

Does it deduplicate repeated points?

No. MultiPoint preserves input point order and duplicates. Use ST_Union for deduplication.