Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
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)]