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

GRASS GIS trac at osgeo.org
Wed Apr 8 11:47:44 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 mmetz):

 Replying to [comment:9 neteler]:
 > Fixed in GRASS 7, r36632 (stream_dir is already lowercase there).
 Remains open for GRASS 6.

 Nice!

 Just a few comments:

 /var/tmp does not exist on Windows, so this is not really a good choice
 for default temp directory.

 It is ok to call G_tempfile() in
 {{{
 streamdir->answer     = G_store(dirname(G_tempfile()));
 }}}
 because this happens in r.terraflow after G_gisinit() is called, not
 before.

 AFAIKT, G_tempfile() only returns a filename, a file is not created (the
 description of G_tempfile() says so).

 Therefore I would opt to change to standard grass policy and use
 dirname(G_tempfile()) as suggested first by Markus N, because that
 directory exists always, independent of the OS.

 Increasing the memory option to e.g. 75% doesn't really help for massive
 grids (the main aim of r.terraflow) unless there are much more than 8GB of
 RAM available (e.g. a cluster with 64GB RAM). Most users don't use a
 cluster and probably have systems with something between 2GB and 8GB RAM;
 in these cases the stream_dir is needed, with enough disk space.

 Last comment: any reason why STREAMTMP_DIR is set system-wide and not with
 G_putenv()? Code in question is here:

 [http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/raster/r.terraflow/main.cc#L503
 grass/branches/develbranch_6/raster/r.terraflow/main.cc#L503]

 Markus M

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


More information about the grass-dev mailing list