I'd like to know how to connect two points not in a linear way (shortest way), but following an existing route in QGIS. I'm using "Points to path".
For example, not in this way:
but in this way:
Any suggestions?
I'd like to know how to connect two points not in a linear way (shortest way), but following an existing route in QGIS. I'm using "Points to path".
For example, not in this way:
but in this way:
Any suggestions?
Easiest is to use Network tool Shortest path: Menu processing > Toolbox > Shortest path (point to point).
Use the line as network layer. For start- and end-point activate snapping and select the points by clicking on the ... icon as you can see on the screesnhot: the red line is the output.
I propose that you split your route (blue line) using the two points, then select the resulting line segment of interest (which is labeled in your second screenshot as "Output"). To do this, use the Processing > Toolbox > Saga > Features - Lines > Split Lines at Points tool.
See also: Splitting line layer using another point layer in QGIS