I have a line feature class representing a gas distribution network. It's just a simple line feature class, no linear referencing or geometric networks involved.
Pipes are somewhat arbitrarily split into sections ranging from 1m or less in length up to around 1km. Each section has a Pipe ID and a field containing the number of repairs to that section over the last seven years, along with attributes such as material, diameter, pressure range etc.
What I want to do is merge contiguous sections that share the same material, diameter and pressure range and get a sum of the number of repairs on all of the pipe sections that make up that 'superstring'.
Dissolve seemed to be the tool for the job, but looking at the results, it's not doing what I need. First of all, it's not merging contiguous features that share the attributes specified in all cases, for example, in the image below the green lines all share the same material, diameter and pressure, but they remain as four separate features (the long horizontal at the top, the two vertical and the shorter horizontal at the bottom). It doesn't seem to make a difference if I select 'unsplit lines' or not.
The other issue is that the sum of repairs I get is for ALL features sharing those attributes, and is the same on each dissolved feature! E.g. each of the four features in the image below has the same sum, and I suspect even if I could get them to merge properly with the Dissolve tool then the single feature would also have that same total - which applies to the whole network and not just to the contiguous section.
Is there a way to do what I want, that is, combine contiguous features that share certain attributes, and summarise another attribute but JUST for each contiguous set of features?
Just to add, obviously the above is with create multipart features unticked. If I tick create multipart features, the features above are merged as I want, but they're also part of the same feature as all the other pipes with the same attributes that are not contiguous with that section!
If I then do Multipart to Singlepart, I end up with single lines split wherever there's a junction, so in the screenshot example above, the top horizontal line is split into three separate features...
So basically what I need to do is dissolve my line features to contiguous multipart features... Not just one multipart feature and not into features that are contiguous as far as single part features allow, but something in between.