ST_ENDPOINT
Returns the last Point in a LineString.
Syntax
ST_ENDPOINT(<geometry_or_geography>)
Arguments
Return Type
Geometry.
Examples
GEOMETRY examples
SELECT
ST_ENDPOINT(
ST_GEOMETRYFROMWKT(
'LINESTRING(1 1, 2 2, 3 3, 4 4)'
)
) AS pipeline_endpoint;
┌───────────────────┐
│ pipeline_endpoint │
├───────────────────┤
│ POINT(4 4) │
└───────────────────┘
GEOGRAPHY examples
SELECT
ST_ENDPOINT(
ST_GEOGFROMWKT(
'LINESTRING(1 1, 2 2, 3 3, 4 4)'
)
) AS pipeline_endpoint;
┌───────────────────┐
│ pipeline_endpoint │
├───────────────────┤
│ POINT(4 4) │
└───────────────────┘