Just to reflect a little over the complexity this may generate, see below a python snippet below:
def main():
import arcpy
fc_in = r'C:\GeoNet\JumpLines\data.gdb\test_in_v04'
fc_out = r'C:\GeoNet\JumpLines\data.gdb\test_out_v04'
test_lines_in = []
test_lines_out = []
jump_size = 0.25
clearence = 0.05
pnts1 = [[-1,0], [10, 10]]
pnts2 = [[3, 10], [6, 1]]
sr = arcpy.SpatialReference(3857)
line1 = arcpy.Polyline(arcpy.Array([arcpy.Point(*pnt) for pnt in pnts1]), sr)
line2 = arcpy.Polyline(arcpy.Array([arcpy.Point(*pnt) for pnt in pnts2]), sr)
test_lines_in.append(line1)
test_lines_in.append(line2)
arcpy.CopyFeatures_management(test_lines_in, fc_in)
mp = line1.intersect(line2, 1)
pnt = mp.getPart(0)
pntg = arcpy.PointGeometry(pnt, sr)
jump_buf = pntg.buffer(jump_size)
jump_buf_line = jump_buf.boundary()
cut_lst = jump_buf_line.cut(line1)
jump_line = cut_lst[0]
test_lines_out.append(jump_line)
cut_lst = line1.cut(jump_buf_line)
keep_lines = cut_lst[0]
test_lines_out.append(keep_lines)
mp = line2.intersect(jump_line, 1)
pnt = mp.getPart(0)
pntg = arcpy.PointGeometry(pnt, sr)
clear_buf = pntg.buffer(clearence)
clear_buf_line = clear_buf.boundary()
cut_lst = line2.cut(clear_buf_line)
keep_lines = cut_lst[0]
test_lines_out.append(keep_lines)
arcpy.CopyFeatures_management(test_lines_out, fc_out)
if __name__ == '__main__':
main()
This code hardly contains any intelligence and will only work in very specific situation. When you run the code and look at the result you will see this:
Input lines:
Resulting lines after process:
Looks almost acceptable, right? However, when crossing lines have more similar angles like this:
The result will have flaws:
Maybe it is better to use color to distinguish the lines:
Or use schematics or the new ArcGIS Utility Network Management extension diagrams to visualize the lines in a more understandable way.