Skip to content

ST_ENDPOINT

Returns the last point of a LINESTRING.

See also:

Syntax

sql
ST_ENDPOINT(<input>)

Arguments

  • <input>: The GEOGRAPHY linestring object

Returns

Returns a POINT representing the last point of the input LINESTRING. Returns NULL if the input is not a LINESTRING.

Example

sql
SELECT ST_AsText(ST_EndPoint('LINESTRING(1 1, 2 2, 3 3)'::GEOGRAPHY));
-- POINT(3 3)