[GRASS-dev] [GRASS GIS] #1840: r.drain manual example not working

GRASS GIS trac at osgeo.org
Thu Dec 27 08:10:37 PST 2012


#1840: r.drain manual example not working
-------------------------+--------------------------------------------------
 Reporter:  neteler      |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  major        |   Milestone:  6.4.3                    
Component:  Raster       |     Version:  svn-releasebranch64      
 Keywords:  r.drain      |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------

Comment(by mmetz):

 Replying to [comment:1 rashadkm]:
 > with the attached diff and drain.c it produces correct output from
 r.drain. I had tested diffrent start location and it worked
 >
 > Only problem is output map is always of type CELL. Will it be  a
 problem?

 Yes, it will be a problem, because the examples in the manual of r.drain
 are based on a DEM, in which case the code is correct and the example is
 wrong, the path should stop as soon as a border is reached or any neighbor
 cell is NULL.

 I have updated r.cost/r.walk/r.drain in r54417-9. r.drain can now read
 GRASS standard directions, e.g. flow directions from r.watershed
 (multiplied with 45 in order to get degrees CCW from East) in addition to
 movement directions from r.cost/r.walk. The examples in the manual of
 r.drain are fixed.

 What remains to be tested and fixed is input from r.cost/r.walk where the
 path reaches a border.

 Markus M

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



More information about the grass-dev mailing list