Aller au contenu principal

st_pointfromgeohash

Renvoie le centre de la boîte de grille géohachée correspondant à la valeur d'entrée du geohash sous forme de géométrie ponctuelle 2D.

Pour la fonction Databricks SQL correspondante, consultez la fonctionst_pointfromgeohash.

Syntaxe

Python
from pyspark.databricks.sql import functions as dbf

dbf.st_pointfromgeohash(col=<col>)

parameter

parameter

Type

Description

col

pyspark.sql.Column OU str

Une chaîne de caractères représentant une valeur de géohash.

parameter

Type

Description

col

pyspark.sql.Column OU str

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