Share via


st_multi function

Applies to: check marked yes Databricks Runtime 17.1 and above

Important

This feature is in Public Preview.

Returns the input GEOGRAPHY or GEOMETRY value as an equivalent multi-geospatial value.

Syntax

st_multi ( geoExpr )

Arguments

  • geoExpr: A GEOGRAPHY or GEOMETRY value.

Returns

A value of type GEOGRAPHY or GEOMETRY, representing a multi-geospatial value.

The SRID value of the output GEOGRAPHY or GEOMETRY value is equal to that of the input value.

The dimension of the output GEOGRAPHY or GEOMETRY value is the same as that of the input value.

The function returns NULL if any of the inputs is NULL.

Examples

-- Converts a point geometry to a multipoint geometry.
> SELECT st_asewkt(st_multi(st_geomfromtext('POINT Z (1 2 100)', 4326)))
  SRID=4326;MULTIPOINT Z ((1 2 100))
-- Converts a multipoint geometry to a multipoint geometry (identity).
> SELECT st_asewkt(st_multi(st_geomfromtext('MULTIPOINT Z (1 2 100)', 3857)))
  SRID=3857;MULTIPOINT Z ((1 2 100))
-- Converts a point geography to a multipoint geography.
> SELECT st_asewkt(st_multi(st_geogfromtext('POINT Z (1 2 100)')))
  SRID=4326;MULTIPOINT Z ((1 2 100))
-- Converts a multipoint geography to a multipoint geography (identity).
> SELECT st_asewkt(st_multi(st_geogfromtext('MULTIPOINT Z (1 2 100)')))
  SRID=4326;MULTIPOINT Z ((1 2 100))