[GRASS-dev] Re: [GRASS GIS] #70: imagery modules: strip @mapset part

GRASS GIS trac at osgeo.org
Wed May 21 07:41:38 EDT 2008


#70: imagery modules: strip @mapset part
----------------------+-----------------------------------------------------
  Reporter:  hamish   |       Owner:  grass-dev at lists.osgeo.org
      Type:  defect   |      Status:  new                      
  Priority:  major    |   Milestone:  6.4.0                    
 Component:  default  |     Version:  svn-trunk                
Resolution:           |    Keywords:  imagery                  
----------------------+-----------------------------------------------------
Comment (by glynn):

 Replying to [comment:12 neteler]:

 > While i.class now works from cmd line, it still fails interactively:

 That's a separate issue, which was introduced in r24069.

 > <list>

 > no subgroup files available in current mapset

 If you read that literally, it should give you a clue what's going on
 here.

 > I suspect a bug in [source:grass/trunk/lib/imagery/find.c]

 Nope; it's a limitation of G_parser(), which cannot handle subgroups.
 Essentially, "old,subgroup,subgroup" isn't a valid ->gisprompt setting.

 G_parser() itself knows nothing of the imagery library, and there is no
 way for individual modules to extend it. When G_parser() performs
 interactive input for an option with "old,<element>,<description>" as the
 ->gisprompt value, it just checks for the file in the <element> directory.
 Similarly, if you type "list", it just lists the <element> directory.

 Well, mapsets don't have a "subgroup" directory, as subgroups belong to
 specific groups, not the mapset. Beyond that, G_parser() would have no way
 of knowing which group the subgroup belongs to (it cannot know that the
 value of the group= option indicates this).

 Ultimately, you'll have to just remove the ->gisprompt setting, leaving
 the option as just a string.

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


More information about the grass-dev mailing list