I have a shapefile which comprises a number of lines, each representing a bus route. I'm wanting to create a new bus route which is the same as an existing line to a certain point, but then branches off and follows a different route (see image below).
What's the best way to do this?
I'll be doing it numerous times. I'm thinking the best way is to draw a polygon around the parts I want and then clip using the same polygon, and dissolving the result. I don't really want to draw new lines by snapping the vertices to existing routes as each route has thousands of vertices.
I am using QGIS 3.2.3.
2 Answers 2
You can use the Snapping toolbar and click on Enable tracing to trace the existing polylines this much more easier to draw a new line using existing lines'
Existing line'
Adding new line (purple color)
I think the easiest way is to Split Features and merge later.
For immediate access activate the Advanced Digitizing and Snapping toolbars.
GabrielDeLuca-Routes_1
Select Split Features and draw a line that cuts both entities through their intersection.
Make sure you have the option "Enable Snapping on Intersection" active.
GabrielDeLuca-Routes_2
The result is two new features, which retain the attributes of the previous ones (if you had had one line selected at the moment of the split, then that line would be broken, leaving the other line as it was).
GabrielDeLuca-Routes_3
Then, select the sections you want to join and Merge Selected Features.
You can assign to the new entity the attribute of any of the above or a new one.
GabrielDeLuca-Routes_4
A new entity will be created, disappearing the originals.
GabrielDeLuca-Routes_5
If the lines were in different layers, you should cut first one and then the other. But to be able to join them again each section must be in the same layer.