[GRASS-dev] [GRASS GIS] #2298: r.stream.order hack= generates order 1 single pixels

GRASS GIS trac at osgeo.org
Wed May 21 08:09:33 PDT 2014


#2298: r.stream.order hack= generates order 1 single pixels
----------------------------+-----------------------------------------------
 Reporter:  hcho            |       Owner:  grass-dev@…              
     Type:  defect          |      Status:  new                      
 Priority:  major           |   Milestone:  7.1.0                    
Component:  Raster          |     Version:  svn-trunk                
 Keywords:  r.stream.order  |    Platform:  Linux                    
      Cpu:  x86-64          |  
----------------------------+-----------------------------------------------

Comment(by hcho):

 I did more testing and found the reason why I got this issue. It was not a
 bug of any modules, I would say. In my new screenshot attached, the green
 line was created by r.stream.order stream_vector= and the black line and
 purple pixels by r.stream.order hack= & r.to.vect.

 As you can see, the green line flows downwards at the point where the
 black and green lines don't agree, and goes right-up. This is the correct
 flow line and was rasterized to the purple pixels "correctly". But the
 problem is that by looking at the pixels only, we or r.to.vect cannot tell
 if the flow should be drawn like the green line (with no single pixel
 tributary) or black line (with a single pixel tributary), and r.to.vect
 did the latter, causing single pixel tributaries here and there. Can we
 say r.to.vect did something wrong? I wouldn't say so.

 There are two solutions.
 1. Use r.stream.order stream_vect=, but it requires an accumulation map
 and vector clipping/merging if you're only interested in the main stream
 in a study area. The main stream will be exact though.

 2. Use r.stream.order hack= and r.to.vect, but build polylines using
 v.build.polylines, clean up dangles with v.edit, and rebuild polylines.
 The main stream will lose single pixel sharp turns and be a little bit
 smoother than 1.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/2298#comment:8>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list