[postgis-users] Merge MultiLineString not Ordered

Paul Ramsey pramsey at opengeo.org
Mon Apr 20 13:21:14 PDT 2009


Linemerge doesn't seem that sensitive to order...

postgis=# select st_astext(st_linemerge( 'MULTILINESTRING((1 1, 0
0),(1 1, 2 2))') );
        st_astext
-------------------------
 LINESTRING(0 0,1 1,2 2)
(1 row)

postgis=# select st_astext(st_linemerge( 'MULTILINESTRING((0 0, 1
1),(1 1, 2 2))') );
        st_astext
-------------------------
 LINESTRING(0 0,1 1,2 2)
(1 row)


On Mon, Apr 20, 2009 at 1:04 PM, Emiliano Romero <eromero at sitrack.com> wrote:
>
> I actually mean the start of the second is the START of the first. That's my
> problem, ST_LineMerge don't merge them. I'm trying a workaround with
> ST_Reverse. But I dont know if this's going to work.
>
> Regards
>
>
> Paragon Corporation wrote:
>>
>> I assume you mean the start of the second is the end of the first?
>>
>> Have you tried ST_LineMerge ?
>> http://postgis.refractions.net/documentation/manual-svn/ST_LineMerge.html
>>
>> Leo
>>
>>
>> -----Original Message-----
>> From: postgis-users-bounces at postgis.refractions.net
>> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of
>> Emiliano
>> Romero
>> Sent: Monday, April 20, 2009 2:59 PM
>> To: postgis-users at postgis.refractions.net
>> Subject: [postgis-users] Merge MultiLineString not Ordered
>>
>>
>> Hi!, I have a MultiLineString with two LineStrings inside. The start of
>> the
>> first is the start of the second one. Is there any way to union/merge into
>> a
>> single linestring?
>>
>> I could simply use ST_Reverse, but actually there can be several
>> LineStrings
>> inside the MultiLineString.
>>
>> Any help will be appreciated.
>>
>> Regards
>> Emiliano Romero
>>
>>  This email and any attachments thereof may contain confidential,
>> privileged, proprietary, or otherwise private information. This email is
>> intended solely for the use of the individual to whom it is addressed. If
>> you are not the intended recipient of the email and its attachments please
>> inform the sender immediately and do not disclose the contents to any
>> other
>> person, use it for any purpose or store or copy the information in any way
>> and delete this e-mail and its attachments from your system. Any views or
>> opinions expressed are solely those of the author.
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
>
> This email and any attachments thereof may contain confidential, privileged,
> proprietary, or otherwise private information. This email is intended solely
> for the use of the individual to whom it is addressed. If you are not the
> intended recipient of the email and its attachments please inform the sender
> immediately and do not disclose the contents to any other person, use it for
> any purpose or store or copy the information in any way and delete this
> e-mail and its attachments from your system. Any views or opinions expressed
> are solely those of the author.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list