Notiz
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Iech unzemellen oder Verzeechnesser ze änneren.
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Verzeechnesser ze änneren.
Important
This feature is in Public Preview.
Returns the input Geography or Geometry value as an equivalent multi geospatial value, keeping the original SRID.
For the corresponding Databricks SQL function, see st_multi function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_multi(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
A Geography or Geometry value. |
Notes
Multi geospatial values and geometry collections are returned as is, with the same SRID.
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('POINT M (1 2 4)',)], ['wkt'])
df.select(dbf.st_asewkt(dbf.st_multi(dbf.st_geomfromtext('wkt', 4326))).alias('result')).collect()
[Row(result='SRID=4326;MULTIPOINT M ((1 2 4))')]
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('MULTIPOINT ZM ((1 2 3 4))',)], ['wkt'])
df.select(dbf.st_asewkt(dbf.st_multi(dbf.st_geogfromtext('wkt'))).alias('result')).collect()
[Row(result='SRID=4326;MULTIPOINT ZM ((1 2 3 4))')]