Name

ST_StartPoint — Returns the start point of a LineString.

Synopsis

geometry ST_StartPoint(bytea Geometry);

Alias

StartPoint

Description

Returns the start point of a LineString or MultilineString. With different geometries returns null.

Coordinate Dimensions
2D3DM
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006))SQL-MM Part 3
2.1.5.17.2.12.17.2.10.27.2.6

Examples

SELECT ST_AsText(ST_StartPoint(ST_GeomFromText('LINESTRING (0 0 15 -2, 10 10 20 -4, 20 10 50 -5)')));
--Result
POINT (0 0 15 -2)

SELECT ST_AsText(ST_StartPoint(ST_GeomFromText('MULTIPOINT (0 0, 10 10, 20 10)')));
--Result
null

Related functions

ST_EndPoint,ST_PointN