I've been trying to dissolve streams, using orders programatically and I came across this VB script. The reason is that if I use ArcGIS dissolve, it merges the confluence of the same orders. I would appreciate if someone with the know-how can give some hints on how to implement this VB script using python.

arc = read all arcs
for order = 1 to maximal order loop
    start_arcs = select all starting arcs of actual order
    for all a in start_arcs loop
        c = a
        do while b = select arc where c.to_code = arc.from_node
            if c.order = b.order then
                c.dissolve = dissolve_counter
                c = b
                dissolve_counter = dissolve_counter + 1
                exit do
            end if
    next a
next order
dissolve all segments with same dissolve counter
  • I think i also faced the same problem. example is , having a stream with order 1,2,3,4.when two streams with order 2 end at the begining of order 3 node, if you dissolve the streams using the order field , the two streams join together to form one single order 2 stream instead of 2 streams. – user14459 Jan 22 '13 at 8:02
  • Are you attempting to create an unique segment ID for each stream? Something like this in RivEX? – Hornbydd Oct 23 '13 at 12:26

If you are suggesting that all segments of the same order are a multipart polyline, then use the Multipart To Single Part (Data Management) tool.

| improve this answer | |

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.