[GRASS-dev] [GRASS GIS] #2437: order parameters in g.remove window

GRASS GIS trac at osgeo.org
Thu Oct 9 06:37:20 PDT 2014


#2437: order parameters in g.remove window
-------------------------+--------------------------------------------------
 Reporter:  pvanbosgeo   |       Owner:  grass-dev@…              
     Type:  enhancement  |      Status:  new                      
 Priority:  normal       |   Milestone:  7.1.0                    
Component:  Default      |     Version:  unspecified              
 Keywords:  g.remove     |    Platform:  All                      
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------

Comment(by glynn):

 Replying to [comment:10 hcho]:

 > which can be misleading because it doesn't take multiple pattern
 strings, but it only takes multiple map names and a single pattern string.

 There seems to be two problems here.

 One is that the meaning of pattern=/exclude= may change depending upon
 whether -r/-e are used. I thought that we had already learned that making
 the semantics of one option change according to the value given for other
 options is a bad idea.

 The other is that there seems to be confusion over the meaning of
 pattern=/exclude= in the absence of -r/-e. Is it a list of map names, or a
 glob pattern? It can't be both unless both G_parser() and the GUI
 recognise "list of map names or string" as a distinct type. "list of map
 names" won't allow the use of glob patterns because G_parser() will
 complain about illegal characters and "string" won't work insofar as the
 GUI won't provide a browser interface for it.

 One solution would be to add a separate option (e.g. names=) which accepts
 multiple valid map names, mark pattern= and names= as mutually exclusive.
 names= would support multiple options and some form of browsing, pattern=
 would be a plain string. Similarly for exclusion.

 Another solution would be rename g.remove to e.g. g.mremove, remove the
 pretence about pattern=/exclude= being something other than "arbitrary
 string", and add a g.remove script which would be a thin wrapper around
 g.mremove (possibly the only difference would be to re-declare the types
 of the pattern=/exclude= options).

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



More information about the grass-dev mailing list