Condividi tramite


st_pointfromgeohash

Importante

Questa funzionalità è in Anteprima Pubblica.

Restituisce il centro della casella della griglia geohash corrispondente al valore geohash di input come geometria di punto 2D.

Per la funzione SQL di Databricks corrispondente, vedere st_pointfromgeohash funzione.

Sintassi

from pyspark.databricks.sql import functions as dbf

dbf.st_pointfromgeohash(col=<col>)

Parametri

Parametro TIPO Description
col pyspark.sql.Column o str Una stringa che rappresenta un valore geohash.

Esempi

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)')]