Returns the start point of a LineString or circular string geometry. Returns NULL for any other geometry type.
Syntax
geometry ST_StartPoint(geometry geomA)Parameters
| Parameter | Description |
|---|---|
geomA | The geometry object. |
Description
Preserves z coordinates — 3D geometries are supported without coordinate loss.
Supports circular strings and curves in addition to standard LineString geometries.
Examples
Get the start point of a LineString:
SELECT ST_AsText(ST_StartPoint('LINESTRING(0 0,2 2)'::geometry));Output:
st_astext
------------
POINT(0 0)
(1 row)该文章对您有帮助吗?