[GRASS-dev] GRASS 7 raster coding best practices

Glynn Clements glynn at gclements.plus.com
Mon May 5 00:52:32 EDT 2008


Yann Chemin wrote:

> >  > Same goes for G_OPT_R_OUTPUT, but I could not find it for parameters
> >  > in float format (G_OPT_F_INPUT?) for example...
> >
> >  Huh? What would be the settings for such an option?
> >
>        input = G_define_option(G_OPT_F(D?)_INPUT) ;

Presumably that should be G_define_standard_option()?

>        input->key        =_("parameter");
>        input->type       = TYPE_DOUBLE;
>        input->required   = YES;
>        input->gisprompt  =_("value, parameter");
>        input->description=_("Value of the parameter");
>        /*input->answer     =_("0.000");*/
>        input->guisection = _("Required");

I can't see any use for that. In practice, you would probably end up
manually overriding as many settings as if you had just used
G_define_option(). E.g. I doubt that either the ->key or ->description
fields would be left untouched.

Also, the ->gisprompt setting is completely bogus; the string is never
localised, and neither "value" nor "parameter" are valid keys.

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


More information about the grass-dev mailing list