Skip to content

Returns the last Point in a LineString.

ST_ENDPOINT(<geometry>)
ArgumentsDescription
<geometry>The argument must be an expression of type GEOMETRY that represents a LineString.

Geometry.

SELECT
ST_ENDPOINT(
ST_GEOMETRYFROMWKT(
'LINESTRING(1 1, 2 2, 3 3, 4 4)'
)
) AS pipeline_endpoint;
┌───────────────────┐
│ pipeline_endpoint │
├───────────────────┤
POINT(4 4) │
└───────────────────┘