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 first point of the input linestring, or None if it doesn't exist.
For the corresponding Databricks SQL function, see st_startpoint function.
Syntax
from pyspark.databricks.sql import functions as dbf
dbf.st_startpoint(col=<col>)
Parameters
| Parameter | Type | Description |
|---|---|---|
col |
pyspark.sql.Column or str |
A Geography or Geometry value representing a linestring. |
Examples
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('LINESTRING(1 2,3 4,5 6)',)], ['wkt'])
df.select(dbf.st_asewkt(dbf.st_startpoint(dbf.st_geogfromtext('wkt'))).alias('result')).collect()
[Row(result='SRID=4326;POINT(1 2)')]
from pyspark.databricks.sql import functions as dbf
df = spark.createDataFrame([('LINESTRING ZM (1 2 3 4,5 6 7 8)',)], ['wkt'])
df.select(dbf.st_asewkt(dbf.st_startpoint(dbf.st_geomfromtext('wkt', 4326))).alias('result')).collect()
[Row(result='SRID=4326;POINT ZM (1 2 3 4)')]