ST_LineFromMultiPoint
Determine the linestring geometry that connects all of the points of a multipoint geometry.
Syntax
ST_LineFromMultiPoint(mpgeo);
- mpgeo
- The input multipoint geometry.
Type: VARCHAR(ANY)
Returns
A value of type VARCHAR(ANY) that is the linestring geometry that connects all of the points of the input multipoint geometry.
Examples
SELECT inza..ST_AsText(inza..ST_LineFromMultiPoint(inza..ST_WKTToSQL('MULTIPOINT (1 1, 1 2, 2 2, 2 1, 1 1)', 4326, false, true)));
ST_ASTEXT
---------
LINESTRING (1 1, 1 2, 2 2, 2 1, 1 1)
(1 row)
SELECT inza..ST_AsText(inza..ST_LineFromMultiPoint(inza..ST_WKTToSQL('MULTIPOINT (0 0, 1 1, 2 2)')));
ST_ASTEXT
---------
LINESTRING (0 0, 1 1, 2 2)
(1 row)