I have Road Network which was selected based on some criteria. Below is image representing it. Each beginning and end of Road Segment is marked with cross:
Selection led to fragmentation of this network. How can I merge (ArcGIS, QGIS, PostGIS) all lines that form consistent continuity, like in image below (colors represent 3 lines which should result after merging). Result of merging – based on below example – should be one layer, with 3 rows, where each row represents grouped lines. Road Network has several attributes, but I am not interested in having them in final, merged output. My goal is to group connected lines:
I have tried few approaches e.g.: Using Dissolve and Multipart to Singlepart in QGIS? Join / merge lines that touch and intersect in QGIS and none of it worked. Dissolve and Multipart-to-Singleparts (QGIS) is not working as expected when 3 lines (or more) are touching each other: