Im building a model and I need to dissolve line, that I marked in picture, to a line with field(NUMBER_OF_LINES) value of 2. Thsi filed represents how many lines were constructed to one line after Merge Divided Roads tool. I tried just to Dissolve all lines based on CODE and VOLTAGE and then using Spatial Join, Buffer and Identity to give/return my dissolved lines attributes of the longest line they are constructed off. e.g.: in this case dissolved line (OID:1346 + OID:771) should get field(NUMBER_OF_LINES) value(2).I get good results when creating a buffer from dissolved line and then finding longest line in it. But if some polygones overlap at some places the value of longest line may be incorect.

I'm working with ArcGIS 10.2.2 Advanced licence. Thanks for your time reading this.

enter image description here


I suggest that you use the unsplit line tool instead of dissolve. This will be based on the geometry and not on some attribute which do not seem consistent in your example (merging 1 with 2).

In order to get the attribute, I would convert the length to a large integer value (round and multiply by 1000), ask for the "MAX" of this new field and join the table of the new feature class with the old one based on the "MAX_length" and the "length" field. The probability to have non unique length is very small, but you could check to make sure they are all unique before using this quick and dirty workaround.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.