Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
This feature is in Public Preview.
Parses an Extended Well-Known Text (EWKT) description of a geography and returns the corresponding Geography value. Only SRID 4326 is supported.
For the corresponding Databricks SQL function, see st_geogfromewkt function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_geogfromewkt(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
A string value, representing a geography in Extended WKT (EWKT) format. |
Notes
The SRID of the returned Geography value is 4326.
The function returns None if the input is None.
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('SRID=4326;POINT Z (1 2 3)',)], ['ewkt'])
df.select(dbf.st_asewkt(dbf.st_geogfromewkt('ewkt')).alias('result')).collect()
[Row(result='SRID=4326;POINT Z (1 2 3)')]