I am dealing with joining multiple polylines which join each other and also intersect in T sections/crosssections (see attached picture). I could join the straight lines using unsplit tool but it doesnt join/merge the lines at T section or crosssection. However I want everyline that spatially touches other to merge. I used the dissolve tool (multipart option), but it merges/joins all the lines in the shapefile. However I just want only spatially touching lines to be merged as one individual line.
I can do that using editing and then selecting the lines that spatially touch each other and merge them to one. However, I have plenty of lines to do which is very tedious.
I would greatly appreciate if anyone can find me a way to do it automatically using some tools.