[GRASS-dev] GRASS 7 raster coding best practices
Yann Chemin
yann.chemin at gmail.com
Sun May 4 01:21:48 EDT 2008
2008/5/4 Hamish <hamish_b at yahoo.com>:
> Yann Chemin wrote:
> > > I could not find it for parameters in float format (G_OPT_F_INPUT?)
>
> lib/gis/parser.c already defines G_OPT_F_* for input and output files,
> and field separators for those files. Don't use that for floating point
> input values.
OK, good, so not G_OPT_F_*.
>
> > > for example...
> ...
>
> > input = G_define_option(G_OPT_F(D?)_INPUT) ;
> > input->key =_("parameter");
> > input->type = TYPE_DOUBLE;
> > input->required = YES;
> > input->gisprompt =_("value, parameter");
> > input->description=_("Value of the parameter");
> > /*input->answer =_("0.000");*/
>
>
> the only thing I see there that is a candidate for reuse as part of a
> default macro is input->type=TYPE_DOUBLE. The others are all module
> option dependent, e.g. "input->key =_("parameter");" is vague enough to
> be useless in practice.
>
> input->gisprompt is wrong, have a look at the GRASS 5 programmers manual
> for a nice write up about what that is for (maybe in the GRASS 6 one too,
> I'm not sure)
Do you have a link to this one please?
>
>
> > input->guisection = _("Required");
>
> FWIW I consider this to be redundant noise. If it is wished that the
> module GUI(s) group required options in the first tab then they should
> extract that from the input->required field.
>
>
Can you provide an example of filling in input->required, that would
be nice to add.
>
> Hamish
>
>
>
>
>
>
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
>
--
Yann Chemin
International Rice Research Institute
Office: http://www.irri.org/gis
Perso: http://www.freewebs.com/ychemin
More information about the grass-dev
mailing list