Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
            else
                dissolve_counter = dissolve_counter + 1
                exit do
            end if
        done
    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

1 Answer 1

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

 
discard

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.