I am working with a shapefile of streets which include links between two intersections represented as two polylines (depending on presence of a median, for instance). I would like to merge such parallel lines with overlapping end points into a single polyline in order to develop a consistent segment-level unit of observation.
I have tried using different tools in ArcGIS Desktop ("dissolve", "unsplit", "merge divided roads", "collapse dual lines to centerlines") and R (gLineMerge) based on other Q&As with similar sounding issues, but not of these tools/packages resolves the issue across the network.
Let's say the input network looks like the image below. The lines that are highlighted are the lines which are divided, but share common begin and end points.
What I would like is for to simplify the network so as to have these divided roads replaced by a single line, as illustrated by the handdrawn coloured lines below.
Any thoughts on what steps could I do in ArcGIS Desktop to automate such process?
The attributes of the lines include "from node" and "to node" columns, but I would like for the geometry to be averaged out ideally (as opposed to removing duplicates).