ST_POINTN
Returns the N-th Point in a LineString. This function retrieves a specific point from the sequence based on its 1-based index.
Syntax
ST_PointN(ls,N)
PointN(ls,N)Description
Examples
SET @ls = 'LineString(1 1,2 2,3 3)';
SELECT AsText(PointN(GeomFromText(@ls),2));
+-------------------------------------+
| AsText(PointN(GeomFromText(@ls),2)) |
+-------------------------------------+
| POINT(2 2) |
+-------------------------------------+Last updated
Was this helpful?

