Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

ST_Multi

Focus mode
ST_Multi - Amazon Redshift

ST_Multi converts a geometry to the corresponding multitype. If the input geometry is already a multitype or a geometry collection, a copy of it is returned. If the input geometry is a point, linestring, or polygon, then a multipoint, multilinestring, or multipolygon, respectively, that contains the input geometry is returned.

Syntax

ST_Multi(geom)

Arguments

geom

A value of data type GEOMETRY or an expression that evaluates to a GEOMETRY type.

Return type

GEOMETRY with subtype MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, or GEOMETRYCOLLECTION.

The spatial reference system identifier (SRID) of the returned geometry is the same as that of the input geometry.

If geom is null, then null is returned.

Examples

The following SQL returns a multipoint from an input multipoint.

SELECT ST_AsEWKT(ST_Multi(ST_GeomFromText('MULTIPOINT((1 2),(3 4))', 4326)));
st_asewkt ------------------------------------ SRID=4326;MULTIPOINT((1 2),(3 4))

The following SQL returns a multipoint from an input point.

SELECT ST_AsEWKT(ST_Multi(ST_GeomFromText('POINT(1 2)', 4326)));
st_asewkt ------------------------------------ SRID=4326;MULTIPOINT((1 2))

The following SQL returns a geometry collection from an input geometry collection.

SELECT ST_AsEWKT(ST_Multi(ST_GeomFromText('GEOMETRYCOLLECTION(POINT(1 2),MULTIPOINT((1 2),(3 4)))', 4326)));
st_asewkt ------------------------------------ SRID=4326;GEOMETRYCOLLECTION(POINT(1 2),MULTIPOINT((1 2),(3 4)))

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.