Background:
As part of a route selection process I have multiple route options which often share segments. I need to keep the underlying data correct while displaying all routes in a way that they don't obscure each other.
Desired Result:
I would like to do this by offsetting the different routes, but only where they share segments with other routes, something like this (taken from another SE question):
What I've Tried:
Giving each route an offset in its symbology works OK when the routes are overlapping but this method breaks down when they are not because the route is now being shown in the wrong place.
I tried following this answer to a similar question: https://gis.stackexchange.com/a/141627/98170 but the result is the same as manually applying offsets as above.
This question and answer look great: Display overlapping polyline segments as multiple lines with offsets? but it is for Leaflet not QGIS.
This answer https://gis.stackexchange.com/a/239370/98170 is almost there but I don't want it to pinch back in at each vertex and I don't know how it would work when the lines are no longer overlapping.
I've tried messing around in the geometry generator but to no avail also.
Any help with this would be much appreicated.
"route1 = 'yes' and "route2" = 'yes' and "route3" = 'no'
, with a style that has a line for route 1 and a line for route 2, with appropriate offsets.