[postgis-users] ST_UNION(linestring, linestring) returns a multilinestring

David William Bitner bitner at gyttja.org
Tue Oct 7 12:58:38 PDT 2008


Check out ST_Merge()

On Tue, Oct 7, 2008 at 3:54 PM, Stephen Woodbridge
<woodbri at swoodbridge.com>wrote:

> Hi all,
>
> This is very annoying. I have two linestrings the join end-to-end and I
> want to build a new single linestring by merging the two. How can I do this?
>
> Thanks,
>  -Steve
>
>
> select astext( ST_Union(
>  ST_GeomFromText('LINESTRING(35.5269251710001 33.891749555,35.527091166
> 33.8917984710001)'),
> ST_GeomFromText('LINESTRING(35.527091166 33.8917984710001,35.5274352000001
> 33.8918998510001,35.528236559 33.8919810230001)')
>          ));
>
>              astext
>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>  MULTILINESTRING((35.5269251710001 33.891749555,35.527091166
> 33.8917984710001),(35.527091166 33.8917984710001,35.5274352000001
> 33.8918998510001,35.528236559 33.8919810230001))
> (1 row)
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



-- 
************************************
David William Bitner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081007/6f6b29bb/attachment.html>


More information about the postgis-users mailing list