[GRASS-user] Error with sub-group while using i.gensigset

Glynn Clements glynn at gclements.plus.com
Fri Apr 23 12:52:33 EDT 2010


Martin Landa wrote:

> > So as far as I can see, users Must KNOW which name they gave to their
> > subgroups right? Since this option it's not working, my suggestion is to
> > eliminate this combo-box and subsitute by a text box...
> 
> I was suggesting to remove this element in GRASS 7. Personally I don't
> know what is the reason of 'subgroup' element. I got no answer. In
> GRASS7 'group' could be more generic used for grouping also vectors,
> 3d rasters, etc. What do you think about that?

There is no such thing as a "subgroup element". Elements are listed in
$GISBASE/etc/element_list, and they correspond to subdirectories of
the mapset directory.

Groups are elements; subgroups aren't. Elements exist within a mapset;
a subgroup exists within a group.

This (from lib/gis/parser.c):

    case G_OPT_I_SUBGROUP:
	Opt->key = "subgroup";
	Opt->type = TYPE_STRING;
	Opt->key_desc = "name";
	Opt->required = YES;
	Opt->gisprompt = "old,subgroup,subgroup";
	Opt->description = _("Name of input imagery subgroup");
	break;

is a bug, arising from not understanding the semantics of the
"gisprompt" field. "subgroup" is not a valid element type and
shouldn't appear as the second component of the gisprompt string when
age is "old" or "new".

If you want to have the GUI offer a list for options of type
"subgroup", first there would need to be some way to indicate that an
option is a subgroup (right now, there isn't), then you would need
some way for the GUI to determine which option specifies the group to
which the subgroup belongs (or, use a similar hack to that used for
database columns).

See also: bug/wish #1031.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list