h3_centerasgeojson
Retorna o centro de uma célula H3 no formato GeoJSON. Compatível com Spark Connect.
Para a função Databricks SQL correspondente, consulte a funçãoh3_centerasgeojson.
Sintaxe
Python
from pyspark.databricks.sql import functions as dbf
dbf.h3_centerasgeojson(col=<col>)
Parâmetros
Parâmetro | Tipo | Descrição |
|---|---|---|
|
| Um ID de célula H3, representado como uma coluna ou strings. |
Exemplos
Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(599686042433355775,),], ['h3l'])
df.select(dbf.h3_centerasgeojson('h3l').alias('result')).collect()
Output
[Row(result='{"type":"Point","coordinates":[-121.976375973,37.345793375]}')]