The input looks like this:
The result must look like this:

The input looks like this:
The result must look like this:

Best answer by ebygomm
This sort of process, with a group by on the dissolve should ensure you have no gap, the tricky bit is to work out so the group by dissolves the overlap into the correct road segment
That gives me this sort of result
from a starting point of this
