h3_boundaryaswkb
Returns the boundary of an H3 cell in WKB format. Supports Spark Connect.
For the corresponding Databricks SQL function, see h3_boundaryaswkb function.
Syntax
Python
from pyspark.databricks.sql import functions as dbf
dbf.h3_boundaryaswkb(col=<col>)
Parameters
Parameter | Type | Description |
|---|---|---|
|
| An H3 cell ID, represented as a Column or string. |
Examples
Python
from pyspark.databricks.sql import functions as dbf
from pyspark.sql import functions as f
df = spark.createDataFrame([(599686042433355775,),], ['h3l'])
df.select(f.hex(dbf.h3_boundaryaswkb('h3l')).alias('result')).collect()
Output
[Row(result='01030000000100000007000000646B13AD907A5EC0DE2BFFC9BBA24240B10697AA2E775EC0FF1D42764DAD42409F4271711B7B5EC02EB34CE2D3B64240ED12E93F6A825EC0940FCAC6C6B54240B52A6B96C9855EC044ACAA0935AB4240409BBCCBDC815EC0CC7FA378B0A14240646B13AD907A5EC0DE2BFFC9BBA24240')]