หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
Important
This feature is in Public Preview.
Parses the input EWKB description and returns the corresponding Geometry value.
For the corresponding Databricks SQL function, see st_geomfromewkb function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_geomfromewkb(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
A BINARY value in EWKB format, representing a Geometry value. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(bytes.fromhex('0103000020E6100000010000000400000000000000000000000000000000000000000000000000144000000000000018400000000000001C4000000000000020C000000000000000000000000000000000'),)], ['ewkb'])
df.select(dbf.st_asewkt(dbf.st_geomfromewkb('ewkb')).alias('result')).collect()
[Row(result='SRID=4326;POLYGON((0 0,5 6,7 -8,0 0))')]