Skip to main content
Replace a point in a linestring. SQL reference: ST_SetPoint

Signature

Parameters

ColumnOrName
required
Linestring geometry column which contains the point to be replaced.
Union[ColumnOrName, int]
required
Index for the point to be replaced, 0-based, negative values start from the end so -1 is the last point.
ColumnOrName
required
Point geometry column to be newly set.

Returns

Column
Linestring geometry column with the replaced point, or null if the index is out of bounds.