[postgis-users] Linestring to Multilinestring

Mehmet Sirin m.sirin07 at googlemail.com
Sun Oct 4 16:26:39 PDT 2009


Hi !
I got some linestrings which I want to merge into a multilinestring.
I tried something like this :
SELECT AsText(ST_UNION(
ST_GeomFromText('LINESTRING(1 2 ,2 7)'),ST_GeomFromText('LINESTRING(1.5 7,
6.5 10)')) )

and it worked. But now I saw that in some cases I have more than just 2
linestrings. Too bad that St_union only accepts 2geometries:
ST_UNION(ST_GeomFromText(geometry1, geometry2) )
And thats where my problem starts. Anybody knows how to merge more than 2
Linestring into a Multilinestring?
I'm using Postgis 1.3
best regards
Mehmet Sirin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091005/72e1bcf3/attachment.html>


More information about the postgis-users mailing list