st_geogfromwkt
Preview
This feature is in Public Preview. You can confirm preview enrollment on the Previews page. See Manage Databricks previews.
Parses the WKT description and returns the corresponding Geography value.
For the corresponding Databricks SQL function, see st_geogfromwkt function.
Syntax
Python
from pyspark.databricks.sql import functions as dbf
dbf.st_geogfromwkt(col=<col>)
Parameters
Parameter | Type | Description |
|---|---|---|
|
| A string in WKT format, representing a geography value. |
Examples
Python
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_geogfromwkt('wkt')).alias('result')).collect()
Output
[Row(result='POLYGON((0 0,5 6,7 -8,0 0))')]