ST_LineFromMultiPoint function
The ST_LineFromMultiPoint function takes a multipoint geometry as input parameter and constructs a linestring.
Syndfsafstax
Parameter
- geometry
- A multipoint geometry object for which the linestring is to be created.
Return type
Returns a linestring geometry object that connects all of the points.
Example
The following example illustrates a multipoint linestring:
create table mpoints (id integer, geo db2gse.st_multipoint) organize by row
insert into mpoints values (1, db2gse.st_mpointfromtext('multipoint (1 2, 3 4, 5 6)', 1003))
select substr(db2gse.st_astext(db2gse.st_linefrommultipoint(geo)),1,80) from mpoints
--------------------------------------------------------------------------------
LINESTRING (1.0000000 2.0000000, 3.0000000 4.0000000, 5.0000000 6.0000000)
1 record(s) selected.