Skip to main content
Get the n-th point (starts at 1) for a geometry. SQL reference: ST_PointN

Signature

Parameters

ColumnOrName
required
Geometry column to get the point from.
Union[ColumnOrName, int]
required
Index for the point to return, 1-based, negative values start from the end so -1 is the last point, values that are out of bounds return null.

Returns

Column
n-th point from the geometry as a point geometry column, or null if index is out of bounds.