On 28 March 2012 15:43, Pavel Iacovlev <iacovlev.pa...@gmail.com> wrote: > Thank you for you help Sandro, > > As I understand something like this in theory: > SELECT ST_Node(ST_Collect(the_geom)) FROM roads; > Then I generate series from the result and using ST_Contains find to > what initial "road" geometry the segment belongs and get it's gid or > another attribute. > > Also you know (or maybe someone else knows) is it possible to > accomplish this in PostGIS 1.5 ? >
Hi, Yes it is. Look at st_union() and st_dump. st_union will cut the lines at their intersection points: select st_astext((st_dump(st_union(geometry))).geom) from lines; Nicolas
<<attachment: Screen shot 2012-03-28 at 5.03.32 PM.png>>
_______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users