ST_StartPoint takes a linestring column and returns a point column. The point column represents the first point of the input linestring.
Function | Syntax |
---|---|
Python | start |
SQL | ST |
Scala | start |
For more details, go to the GeoAnalytics for Microsoft Fabric API reference for start_point.
This function implements the OpenGIS Simple Features Implementation Specification for SQL 1.2.1.
Examples
from geoanalytics_fabric.sql import functions as ST, Linestring
df = spark.createDataFrame([(Linestring([[[5,5],[7,6],[6,6],[4,2]]]),)], ["linestring"])
df.select(ST.start_point("linestring").alias("start_point")).show()
Result
+-------------+
| start_point|
+-------------+
|{"x":5,"y":5}|
+-------------+
Version table
Release | Notes |
---|---|
1.0.0-beta | Python, SQL, and Scala functions introduced |