h3_boundaryaswkt

WKT 格式返回 H3 单元格的边界。 支持 Spark Connect。

有关相应的 Databricks SQL 函数,请参阅 h3_boundaryaswkt 函数

Syntax

from pyspark.databricks.sql import functions as dbf

dbf.h3_boundaryaswkt(col=<col>)

参数

参数 类型 Description
col pyspark.sql.Columnstr H3 单元格 ID,表示为 或字符串。

例子

from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(599686042433355775,),], ['h3l'])
df.select(dbf.h3_boundaryaswkt('h3l').alias('result')).collect()
[Row(result='POLYGON((-121.915080327 37.271355867,-121.862223289 37.353926451,-121.923549996 37.428341186,-122.037734964 37.420128678,-122.090428929 37.337556084,-122.029101309 37.263197975,-121.915080327 37.271355867))')]