[postgis-users] Break lines at intersections

Pavel Iacovlev iacovlev.pavel at gmail.com
Wed Mar 28 05:46:03 PDT 2012


Not quite sure if I understand how ST_Node works, but I don't need all
the "line segments" of the linestring, I need the linestrings to brake
(divided into multiple linestrings while retaining the id attribute
preferably) where they intersect with other line in the same table.

I have a attached a small image to represent what I need:
Line 1 - will be divided into 3 lines
Line 2 - will be divided into 2 lines
Line 3 - will be divided into 2 lines

On Wed, Mar 28, 2012 at 2:47 PM, Sandro Santilli <strk at keybit.net> wrote:
> On Wed, Mar 28, 2012 at 01:29:20PM +0300, Pavel Iacovlev wrote:
>
>> Anyone has any ideas/tips of how to break lines at intersections ?
>
> PostGIS 2.0 has an ST_Node() function for that.
>
> --strk;
>
>  ,------o-.
>  |   __/  |    Delivering high quality PostGIS 2.0 !
>  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com
>  `-o------'
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: brake.png
Type: image/png
Size: 7270 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120328/0436aa63/attachment.png>


More information about the postgis-users mailing list