st_geomfromgeohash
Renvoie la boîte de grille geohash correspondant à la valeur geohash d'entrée sous forme de géométrie de polygone 2D.
Pour la fonction Databricks SQL correspondante, consultez la fonctionst_geomfromgeohash.
Syntaxe
Python
from pyspark.databricks.sql import functions as dbf
dbf.st_geomfromgeohash(col=<col>)
parameter
parameter | Type | Description |
|---|---|---|
|
| Une chaîne de caractères représentant une valeur de géohash. |
Exemples
Python
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('9q8yyh',)], ['geohash'])
df.select(dbf.st_astext(dbf.st_geomfromgeohash('geohash')).alias('result')).collect()
Output
[Row(result='POLYGON((-122.431640625 37.77099609375,-122.431640625 37.7764892578125,-122.420654296875 37.7764892578125,-122.420654296875 37.77099609375,-122.431640625 37.77099609375))')]