st_multi
function
Applies to: Databricks Runtime 17.1 and above
Preview
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
: AGEOGRAPHY
orGEOMETRY
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
SQL
-- 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))