How do you join (or dissolve) a line segment to its neighbour that is the shortest?

1783
10
02-20-2017 07:34 AM
by Anonymous User
Not applicable

Hi, what I am trying to do is join/merge/dissolve a line segment (part of one line feature class) to its closest shortest line (within the same feature) 

0 Kudos
10 Replies
DarrenWiens2
MVP Honored Contributor

Just a few points of clarification:

- do the "closest" lines have to be distance = 0?

- does every line segment need to be merged with one other line segment, or will some remain un-merged?

- once a line segment is merged, does it become a candidate for other line segments to merge onto?

- can you describe the steps (i.e. the algorithm) that will produce the results you're after?

- your example of three segments can be solved very easily, but what about if you had 4 segments (10,5,5,15)? I guess if you start at the beginning you would be left with two segments (15,20). But, what if the first segment you considered happened to be in the second position (5). Then, you'd be left with three segments (10,10,15). Basically, it will depend greatly on the order in which you consider the segments.