[GRASS-dev] Re: [GRASS GIS] #520: r.terraflow/iostream does not respect STREAM_DIR option

GRASS GIS trac at osgeo.org
Wed Apr 8 05:56:13 EDT 2009


#520: r.terraflow/iostream does not respect STREAM_DIR option
---------------------+------------------------------------------------------
  Reporter:  mmetz   |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect  |      Status:  new                      
  Priority:  major   |   Milestone:  6.4.0                    
 Component:  Raster  |     Version:  svn-develbranch6         
Resolution:          |    Keywords:                           
  Platform:  All     |         Cpu:  All                      
---------------------+------------------------------------------------------
Comment (by neteler):

 New patch uploaded with bugfix only (so back to /var/tmp/ default). The
 bug is AFAIK here:

 [source:grass/branches/develbranch_6/raster/r.terraflow/main.cc#L179]

 The assignment to opt seems to fail:
 {{{
   opt->mem = atoi(mem->answer);
   opt->streamdir = streamdir->answer;
   G_debug(0,"DEBUG streamdir %s",streamdir->answer);
   G_debug(0,"DEBUG opt %s",opt->streamdir);

 leads to

 GRASS 6.5.svn (spearfish60):> r.terraflow elev=elevation.10m \
     filled=elevation10m.filled     dir=elevation10m.mfdir \
     swatershed=elevation10m.watershed     accumulation=elevation10m.accu \
     tci=elevation10m.tci d8cut=500 memory=800
 stats=elevation10mstats.txt\
     STREAM_DIR=/tmp  --o
 ...
 D0/0: DEBUG streamdir /var/tmp/
 D0/0: DEBUG opt /var/tmp/
 ...
 }}}

 Confusing... Interestingly, if I use (note the d typo):

 {{{
 r.terraflow elev= ... STREAM_dDIR=/tmp
 }}}

 the module does not fail. Apparently parse_args() fails?

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/520#comment:7>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list