h3_boundaryasgeojson
Renvoie la limite d'une cellule H3 au format GeoJSON. Prend en charge Spark Connect.
Pour la fonction Databricks SQL correspondante, consultez la fonctionh3_boundaryasgeojson.
Syntaxe
Python
from pyspark.databricks.sql import functions as dbf
dbf.h3_boundaryasgeojson(col=<col>)
parameter
parameter | Type | Description |
|---|---|---|
|
| Un ID de cellule H3, représenté comme une Colonne ou une chaîne de caractères. |
Exemples
Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([(599686042433355775,),], ['h3l'])
df.select(dbf.h3_boundaryasgeojson('h3l').alias('result')).collect()
Output
[Row(result='{"type":"Polygon","coordinates":[[[-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]]]}')]