Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
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))')]