[GRASS-dev] Re: [GRASS GIS] #676: r.watershed: different output map options do not allow for fully qualified map names

GRASS GIS trac at osgeo.org
Tue Jul 7 12:10:36 EDT 2009


#676: r.watershed: different output map options do not allow for fully qualified
map names
-----------------------+----------------------------------------------------
  Reporter:  mlennert  |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect    |      Status:  new                      
  Priority:  normal    |   Milestone:  6.4.0                    
 Component:  Raster    |     Version:  6.4.0 RCs                
Resolution:            |    Keywords:  r.watershed              
  Platform:  Linux     |         Cpu:  Unspecified              
-----------------------+----------------------------------------------------
Comment (by hamish):

 The problem is not G_legal_filename(). The problem is that you should not
 under normal circumstances be passing fully qualified map names to output=
 options.

 And if you do, it would be useful for something* to strip it away, and
 exit with an error if the value given was not the current mapset.

 [*] hopefully that something is done at the library level so a new fn()
 wouldn't have to be added to all modules, either in G_parser() or in the
 opening of a new map for write. I understand that opening a new map to
 write might be downstream of a G_legal_filename() check already in the
 module, but if you say that is already "cleaned" in GRASS 7 then all that
 needs to be done there is add the @ stripping code to either/both of
 G_parser() and or whatever the Rast_open_new_cell for write fn name is
 called now.


 > Should this also be done in 6.* ?

 definitely not 6.4 -- critical bug fixes only at this point.

 As you may imagine I am very skeptical to touch 6.5 in any big way for
 this small annoyance except for removing or enhancing the GUI map chooser
 button -- AFAIAC all 6.x is closed for refactoring. That is what SVN trunk
 is for.


 > Well, it _is_ convienient in the GUI to be able to chose an
 > existing map if you want to replace it...

 If you keep the module GUI window open it remains there. And you can do
 your Run,Run,Run trial and error again and again. Otherwise I'd just say
 if you want to do destruction of old data you must retype it yourself.

 The user must take positive action to destroy their data. Convenience is
 not a priority in that situation- in fact you want the magnet to slightly
 repel.


 Hamish

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


More information about the grass-dev mailing list