Partager via


st_pointfromgeohash

Important

Cette fonctionnalité est disponible en préversion publique.

Renvoie le centre de la zone de grille geohash correspondant à la valeur geohash d’entrée, sous forme de géométrie de type point en 2D.

Pour la fonction Databricks SQL correspondante, consultez st_pointfromgeohash la fonction.

Syntaxe

from pyspark.databricks.sql import functions as dbf

dbf.st_pointfromgeohash(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_pointfromgeohash('geohash')).alias('result')).collect()
[Row(result='POINT(-122.4261474609375 37.77374267578125)')]