[GRASS5] GRASS module descriptions (3)

Andreas Lange Andreas.Lange at Rhein-Main.de
Wed Nov 22 18:08:49 EST 2000


Hi Michel, Hi Jan-Oliver,

Michel Wurtz wrote:
> I run a "simple" script to show what's happening (see below)
> and found the following infos :
> 
> d.colors, d.pan, d.save, d.what.sites, d.zoom,
> Thoses commands give only the text help when a monitor is running
> Without a running monitor, they print the following error message :
> No graphics monitor has been selected for output.
> Please run "d.mon" to select a graphics monitor.

I noticed this when implementing the testsuite. But i have no obvious
solution.


> d.site.pg, d.vect.pg, d.what.r.pg, d.what.s.pg, d.what.v.pg,
> g.column.pg, g.stats.pg, g.table.pg, v.reclass.pg print :
> Please run g.select.pg to identify a current database.
> 
> (I don't know what's happening with a selected database)
> 
> m.region.ll -help prints :
> m.region.ll - must be in a UTM database
 
> v.in.tig.basic -help prints :
> ERROR: You are not in a UTM or Lat-Long location. Don't use this program.
 
> v.in.tig.lndmk -help prints :
> ERROR: Must be in UTM or Lat-Long location to use this program.
 
> When the location is in UTM, m.region.ll,v.in.tig.basic and
> v.in.tig.lndmk print a correct help message


I already changed one (some?) modules. This is simple, as only the
sequence must be changed:
parameters = G_define_option();
G_gisinit(argv[0]);
if (G_parser(argc, argv))
  exit(-1);

I_must_be_imagery_projection();
_or_
if (G_projection() != PROJECTION_UTM)
  G_fatal_error("This program only runs in UTM projection\n");

(just an example, please do not understand this literally).
 
> r.gdbase, s.gdbase, v.gdbase print (on /dev/tty, not stderr!) :
> working...
> Unable to find the database file:
> 
> s.reclass -help prints :
> Unable to find the input raster file:
> 
> r.mapcalc -help prints :
> you have confused me

r.mapcalc could get a parameter "mode=interactive" "mode=script" or
something like that.
Now r.mapcalc interprets everything from stdin and on the commandline as
an expression. 
 
> r.out.rlc -help prints :
> r.out.rlc: -help  illegal option
> usage: r.out.rlc [-v] input_layer output_layer
> 
> v.in.arc.pg -help prints :
>  Coverage type:
> Enter "polygon(area)" or "line"
> Hit RETURN to cancel.
> >
> 
> v.mkquads -help prints the escape sequence <ESC>[H<ESC>[2J
> before the help for erasing screen and put the help on top
> 
> m.lulc.USGS -help prints :
> Cannot open USGS CTG file
> 
> g.gisenv -help prints nothing
> 

This is all the same with the --interface-description.
For the modules without parser interface there should one implemented,
if the module is of general interest. 

> tcltkgrass launch itself, ignoring the -help option...
> 
> All interactive functions print only:
> Usage : <name of the command>
>     (This command must be run interactively)
> 
> On the other hand, some help messages are huge (75 lines...)
> 
> Sometimes, a blank line is printed before the "Usage:" string
> this is also not consistent...
> --------------- script used --------------------
> cd $GISBASE/bin
> for f in ?.*; do echo '---> '$f; $f -help; done 2>&1 | more
> -------------------------------------------------
> 
> hope this help

cu,

Andreas

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