ST_Union also accepts a set. Attribute the linestrings with some common
attribute and GROUP BY that attribute.
SELECT attr, ST_Multi(ST_Union(the_geom)) AS multi_ls_geom
FROM my_linestring_table
GROUP BY attr;
Cheers,
Kevin
Mehmet Sirin wrote:
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
------------------------------------------------------------------------
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users