I have a polyline shapefile depicting a real road network. In many parts it has two 100 % overlapping segments in opposite directions, representing the two driving directions (In picture: red segments). The perpendicular lines are the start and end points of the segments.
How could I easily select the red segments that share the direction of the black line? (In picture: those red segments that are directed towards North East). So far I can only automatically find the overlapping (with black line) red segments of both directions.
I have a route as a 1-part line (In picture: black line). This is derived from the same road network so the geometry is actually overlapping with the red segments.
I was thinking about this kind of a process, after finding the red segments that overlap with the black polyline:
1) For each red segment
calculate the azimuth (angular direction)
2) Determine the end points of the red segments
3) Split the black line at both end points of the red segments
4) For each split black segment
calculate the azimuth
determine the overlapping 2 red segments
copy the red segment that has the same azimuth (or withing a marginal)
BUT, is there an easier way or a tool? I would like to do this using ArcMap 10.2 Standard or ArcPy.
The route might be twisty so I can't use a global azimuth. I need to filter a complete road network (red lines) with n routes (black lines).