[GRASS5] r.support - initial parser added

Markus Neteler neteler at geog.uni-hannover.de
Mon Dec 11 04:18:19 EST 2000


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 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'
> 

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



More information about the grass-dev mailing list