[GRASS5] r.support - initial parser added

Andreas Lange Andreas.Lange at Rhein-Main.de
Sun Dec 10 17:21:01 EST 2000


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.

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 at geog.uni-hannover.de with
> subject 'unsubscribe grass5'

-- 
Andreas Lange, 65187 Wiesbaden, Germany, Tel. +49 611 807850
Andreas.Lange at Rhein-Main.de - A.C.Lange at GMX.net


---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list