Notiz
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Iech unzemellen oder Verzeechnesser ze änneren.
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Verzeechnesser ze änneren.
Important
This feature is in Public Preview.
Returns the SRID of the input geospatial value.
For the corresponding Databricks SQL function, see st_srid function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_srid(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
A Geography or Geometry value. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('POINT(10 34)',)], ['wkt'])
df.select(dbf.st_srid(dbf.st_geogfromtext('wkt')).alias('result')).collect()
[Row(result=4326)]
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('LINESTRING(1 2,3 4)', '3857',)], ['wkt', 'srid'])
df.select(dbf.st_srid(dbf.st_geomfromtext('wkt', 'srid')).alias('result')).collect()
[Row(result=3857)]