ST_StartPoint

ST_StartPoint takes a linestring column and returns a point column. The point column represents the first point of the input linestring.

FunctionSyntax
Pythonstart_point(linestring)
SQLST_StartPoint(linestring)
ScalastartPoint(linestring)

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

PythonPythonSQLScala
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
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
Use dark colors for code blocksCopy
1
2
3
4
5
+-------------+
|  start_point|
+-------------+
|{"x":5,"y":5}|
+-------------+

Version table

ReleaseNotes

1.0.0-beta

Python, SQL, and Scala functions introduced

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.