[GRASS-dev] Plan to build Package to use GRASS from R

On Wed, Jul 2, 2008 at 4:30 PM, Paul Kelly
<paul-grass@stjohnspoint.co.uk> wrote:

On Wed, 2 Jul 2008, Rainer M Krug wrote:

I finally started working on the implementation of grass commands from
R and most of the translation from the the output from
--interface-description is working. I just have one question at the
moment: some flags require "--" and others "-" and I could not fiind
any indication in the
--interface-description output which one uses which.

Any ideas where I can get that info from?

Flags that are interpreted by the GRASS module option parser and have a
common meaning to all modules are prefixed by --. There is a fixed number of
these (see lib/gis/parser.c for details). The interpretation of flags with a
single - is defined by individual modules when they call G_parser() and the
meaning of single - flags is individually dependent on each module.

Thanks - that explains.I already expected something along these lines.
Is there a way to retrieve these parameter or do I have to hardcode
them (which I would not like to do)?

I wonder if the special parser flags should be left out of the
--interface-description output. Certainly they should be given a different
name to distinguish them from the individual module flags - it's very
confusing the way it is at the minute.

Yes - at least from my perspective. The other option would be to name
them differently - e.g. comflags for common flags?

Paul

--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
South Africa

Paul:

Flags that are interpreted by the GRASS module option
parser and have a common meaning to all modules are prefixed
by --. There is a fixed number of these (see lib/gis/parser.c
for details). The interpretation of flags with a single - is
defined by individual modules when they call G_parser()
and the meaning of single - flags is individually dependent
on each module.

see http://grass.osgeo.org/wiki/Module_command_line_parser

I wonder if the special parser flags should be left out of
the --interface-description output.

note that --overwrite comes and goes depending of if it is relevant
to the module.

re. the module list of flag from r.buffer --help: the vertical descriptions
of flags uses the short version (--q), but note that the top USAGE: line
has the long version. Both ways are listed there on purpose as a hint.

Hamish

On Wed, Jul 2, 2008 at 4:45 PM, Hamish <hamish_b@yahoo.com> wrote:

Paul:

Flags that are interpreted by the GRASS module option
parser and have a common meaning to all modules are prefixed
by --. There is a fixed number of these (see lib/gis/parser.c
for details). The interpretation of flags with a single - is
defined by individual modules when they call G_parser()
and the meaning of single - flags is individually dependent
on each module.

see http://grass.osgeo.org/wiki/Module_command_line_parser

Thanks - so I will hardcode them at the moment following that description.

I wonder if the special parser flags should be left out of
the --interface-description output.

note that --overwrite comes and goes depending of if it is relevant
to the module.

re. the module list of flag from r.buffer --help: the vertical descriptions
of flags uses the short version (--q), but note that the top USAGE: line
has the long version. Both ways are listed there on purpose as a hint.

Hamish

--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
South Africa