ST_STARTPOINT()
All functions > GEOSPATIAL > ST_STARTPOINT()
Returns the first vertex of a LineString.
Signatures
Start point
Returns: First vertex of the line
ST_STARTPOINT(line: T) → GEOM_POINT or GEOG_POINT sql
| Parameter | Type | Required | Description |
|---|---|---|---|
line | T | Yes | A LineString geometry or geography |
With:
T: Custom types: GEOM_LINESTRING | GEOG_LINESTRING
Signature notes:
- Input must be a LineString; other sub kinds return NULL
- Returns NULL if the input is NULL or empty
Examples
FeatureQL
SELECT
f1 := ST_ASTEXT(ST_STARTPOINT(ST_GEOMFROMTEXT('LINESTRING (0 0, 1 1, 2 0)'))) -- First vertex of a line
;Result
| f1 VARCHAR |
|---|
| POINT (0 0) |
On this page