Condividi tramite


st_geogfromtext

Importante

Questa funzionalità è in Anteprima Pubblica.

Analizza la descrizione WKT e restituisce il valore Geography corrispondente.

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

Sintassi

from pyspark.databricks.sql import functions as dbf

dbf.st_geogfromtext(col=<col>)

Parametri

Parametro TIPO Description
col pyspark.sql.Column o str Il valore di una stringa in formato WKT, che rappresenta un valore Geography.

Esempi

from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('POLYGON((0 0,5 6,7 -8,0 0))',)], ['wkt'])
df.select(dbf.st_astext(dbf.st_geogfromtext('wkt')).alias('result')).collect()
[Row(result='POLYGON((0 0,5 6,7 -8,0 0))')]