Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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