I've got some linestrings covering a road network, and need to split them at the crossroads.
Does anybody have any idea on how to do it?
I'm using QGIS 2.4, with a Postgis 2.1.3.
intersectionlinestringpostgisqgis
I've got some linestrings covering a road network, and need to split them at the crossroads.
Does anybody have any idea on how to do it?
I'm using QGIS 2.4, with a Postgis 2.1.3.
Best Answer
There is few resolutions of this issue, maybe there are few better ones but this two should do also:
'By hand' (in steps)
Cut every line with another line which intersects it
Now you've got few too much lines cause every time you're splitting one line into 2 parts, so you have to delete all lines that are covering another smaller ones (Thats why ST_NODE exists)
Automagically
Splitting every line in point of intersection with another line is one of things you have to do to create road topology so maybe it'll be easiest to get familiar with function pgr_createTopology of PG Routing project.
This workshop could be helpfull