I have added an initial parser to r.support. Somewhat
tricky to keep it's behaviour as usual in interactive
mode...
r.support help
Description:
Allows the user to create and/or modify raster map layer support files.
Note: Interactive mode offers more functionality than command line mode.
Usage:
r.support map=name
Parameters:
map raster map name
It's not yet perfect as
[-r] Calculate range
does not appear... Help wanted! The interactive behaviour is unchanged.
I don't know how to find out if "help" was the parameter. Currently I just
check for the number of parameters which is not sufficient. Hints are
welcome.
Don't forget to remove
/usr/local/grass5/etc/bin/main/inter/r.support
(as the module lives in
/usr/local/grass5/etc/bin/main/cmd/r.support now)
and run gmakelinks5.
Thanks
Markus
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'
just an idea:
Why not keep the old module with inter and create a new one from the
code in a new cmd dir?
This should be the standard way of implementing both interactive and
commandline modules. See e. g. r.neighbors for an example.
One could argue if this is really efficient, as the code will somewhat
doubled. But it works.
The commandline parameters are usually controlled with the G_parser
call. If you call "r.support" you will be switched to interactive, if
calling "r.support something" you will be switched to commandline
module.
HTH,
Andreas
Markus Neteler wrote:
Hi all,
I have added an initial parser to r.support. Somewhat
tricky to keep it's behaviour as usual in interactive
mode...
r.support help
Description:
Allows the user to create and/or modify raster map layer support files.
Note: Interactive mode offers more functionality than command line mode.
Usage:
r.support map=name
Parameters:
map raster map name
It's not yet perfect as
[-r] Calculate range
does not appear... Help wanted! The interactive behaviour is unchanged.
I don't know how to find out if "help" was the parameter. Currently I just
check for the number of parameters which is not sufficient. Hints are
welcome.
Don't forget to remove
/usr/local/grass5/etc/bin/main/inter/r.support
(as the module lives in
/usr/local/grass5/etc/bin/main/cmd/r.support now)
and run gmakelinks5.
Thanks
Markus
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'
On Sun, Dec 10, 2000 at 11:21:01PM +0100, Andreas Lange wrote:
Hi Markus,
just an idea:
Why not keep the old module with inter and create a new one from the
code in a new cmd dir?
This should be the standard way of implementing both interactive and
commandline modules. See e. g. r.neighbors for an example.
One could argue if this is really efficient, as the code will somewhat
doubled. But it works.
The commandline parameters are usually controlled with the G_parser
call. If you call "r.support" you will be switched to interactive, if
calling "r.support something" you will be switched to commandline
module.
Hi Andreas,
that will be the best approach. Up to now I have no experience to
write such "splitted" modules (and little time only). If no volunteer
takes over, I may look at it again later.
Markus
Markus Neteler wrote:
>
> Hi all,
>
> I have added an initial parser to r.support. Somewhat
> tricky to keep it's behaviour as usual in interactive
> mode...
>
> r.support help
>
> Description:
> Allows the user to create and/or modify raster map layer support files.
> Note: Interactive mode offers more functionality than command line mode.
>
> Usage:
> r.support map=name
>
> Parameters:
> map raster map name
>
> It's not yet perfect as
> [-r] Calculate range
> does not appear... Help wanted! The interactive behaviour is unchanged.
> I don't know how to find out if "help" was the parameter. Currently I just
> check for the number of parameters which is not sufficient. Hints are
> welcome.
>
> Don't forget to remove
> /usr/local/grass5/etc/bin/main/inter/r.support
> (as the module lives in
> /usr/local/grass5/etc/bin/main/cmd/r.support now)
> and run gmakelinks5.
>
> Thanks
>
> Markus
>
> ----------------------------------------
> If you want to unsubscribe from GRASS Development Team mailing list write to:
> minordomo@geog.uni-hannover.de with
> subject 'unsubscribe grass5'
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'
--
Dipl.-Geogr. Markus Neteler * University of Hannover
Institute of Physical Geography and Landscape Ecology
Schneiderberg 50 * D-30167 Hannover * Germany
Tel: ++49-(0)511-762-4494 Fax: -3984
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo@geog.uni-hannover.de with
subject 'unsubscribe grass5'