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 an array containing the single geometries in the input geometry.
For the corresponding Databricks SQL function, see st_dump function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_dump(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
A Geometry value. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('MULTILINESTRING((1 2,3 4),(7 8,6 5))',)], ['wkt'])
df.select(dbf.st_asewkt(dbf.explode(dbf.st_dump(dbf.st_geomfromtext('wkt', 3857)))).alias('result')).collect()
[Row(result='SRID=3857;LINESTRING(1 2,3 4)'), Row(result='SRID=3857;LINESTRING(7 8,6 5)')]
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('GEOMETRYCOLLECTION(POINT EMPTY,MULTIPOINT(5 6,EMPTY,3 4))',)], ['wkt'])
df.select(dbf.st_astext(dbf.explode(dbf.st_dump(dbf.st_geomfromtext('wkt')))).alias('result')).collect()
[Row(result='POINT EMPTY'), Row(result='POINT EMPTY'), Row(result='POINT(3 4)'), Row(result='POINT(5 6)')]