Partager via


st_geomfromgeohash

Important

Cette fonctionnalité est disponible en préversion publique. Vous pouvez confirmer l’inscription en préversion sur la page Aperçus . Consultez Gérer les préversions d’Azure Databricks.

Retourne la zone de grille geohash correspondant à la valeur geohash d’entrée sous forme de géométrie de polygone 2D.

Pour la fonction SQL Databricks correspondante, consultez st_geomfromgeohash.

Syntaxe

from pyspark.databricks.sql import functions as dbf

dbf.st_geomfromgeohash(col=<col>)

Paramètres

Paramètre Type Descriptif
col pyspark.sql.Column ou str Valeur sous forme de chaîne représentant une valeur geohash.

Examples

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()
[Row(result='POLYGON((-122.431640625 37.77099609375,-122.431640625 37.7764892578125,-122.420654296875 37.7764892578125,-122.420654296875 37.77099609375,-122.431640625 37.77099609375))')]