[GRASS5] GRASS module descriptions (3)

Dear all,

I have checked in these modules with the
ability to tell what they are for (<cmd> -help):

i.cca i.class i.cluster i.fft i.gensig i.gensigset
i.grey.scale i.in.erdas i.maxlik i.out.erdas i.pca
i.smap i.tape.mss.h i.tape.tm.fast i.zc

I will proceed with completing the r.* and
i.* commands.

Anyone volunteering to start with another
group of commands?

(I am maintaining a todo list which modules
still needs to be updated: still 297 modules to go)

Cheers

  Jan

--
Jan-Oliver Wagner http://intevation.de/~jan/

Intevation GmbH http://intevation.de/
FreeGIS http://freegis.org/

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

Jan-Oliver Wagner wrote:

Dear all,

I have checked in these modules with the
ability to tell what they are for (<cmd> -help):

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.

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

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

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
--
Michel WURTZ - DIG - Maison de la télédétection
               500, rue J.F. Breton
               34093 MONTPELLIER Cedex 5

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

Michel Wurtz wrote:

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.

I forget to add that those two commands also send you a mail
with the error message (because output was redirected ?).
I found that sometimes mail is sent, but is there a flag or an
environment variable to suppress that ?

--
Michel WURTZ - DIG - Maison de la télédétection
               500, rue J.F. Breton
               34093 MONTPELLIER Cedex 5

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

Hi Michel,

thanks for your tests! Short comment:

On Wed, Nov 22, 2000 at 04:20:04PM +0000, Michel Wurtz wrote:

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:

-> these are scripts only.

r.out.rlc -help prints :
r.out.rlc: -help illegal option
usage: r.out.rlc [-v] input_layer output_layer

I have added the parser just now:
src.contrib/SCS/raster/r.out.rlc

Usage:
r.out.rlc [-v] input=name output=name

Flags:
  -v run verbose

Parameters:
   input raster map to export
  output export file name

Regards

Markus

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

Markus Neteler wrote:

Hi Michel,

thanks for your tests! Short comment:

On Wed, Nov 22, 2000 at 04:20:04PM +0000, Michel Wurtz wrote:
> 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:
-> these are scripts only.

well, I have slightly modified the scripts, so the -help flag works now.

BTW, there is 2 places where s.reclass can be found. Which version
is used (I didn't modify both the same way :-):
cvs/grass/src.contrib/UCB/gdbase/modules/s.reclass
or
cvs/grass/src/scripts/contrib/s.reclass/s.reclass
--
Michel WURTZ - DIG - Maison de la télédétection
               500, rue J.F. Breton
               34093 MONTPELLIER Cedex 5

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

Hi Jan-Oliver,

i will re-work the commands i updated myself recently. But i don't
recall which modules that are, just some:
m.datum.shift
s.datum.shift
g.setproj
.. can't remember.

But i can not promise any timeframe.

I'll implement a check with the dejaGNU testsuite, but i am in the
unfavorable situation that my local dejaGNU installation on linux, IRIX
and Win is not working. I'll have to wait until another project is
finished as i don't want to risk breaking my expect/tcl/tk installation
too.

cu,

Andreas

Jan-Oliver Wagner wrote:

Dear all,

I have checked in these modules with the
ability to tell what they are for (<cmd> -help):

i.cca i.class i.cluster i.fft i.gensig i.gensigset
i.grey.scale i.in.erdas i.maxlik i.out.erdas i.pca
i.smap i.tape.mss.h i.tape.tm.fast i.zc

I will proceed with completing the r.* and
i.* commands.

Anyone volunteering to start with another
group of commands?

(I am maintaining a todo list which modules
still needs to be updated: still 297 modules to go)

Cheers

        Jan

--
Jan-Oliver Wagner http://intevation.de/~jan/

Intevation GmbH http://intevation.de/
FreeGIS http://freegis.org/

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

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

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

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@Rhein-Main.de - A.C.Lange@GMX.net

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

Hi all, hi Andreas,

I just found why you didn't have g.manual any more:
The updated
src/scripts/contrib/Gmakefile
was not yet checked in.

Sorry for this inconvenience,
now the g.manual (new script) will be "compiled"
on default.

Markus

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

On Wed, Nov 22, 2000 at 06:09:55PM +0000, Michel Wurtz wrote:
[...]

well, I have slightly modified the scripts, so the -help flag works now.

BTW, there is 2 places where s.reclass can be found. Which version
is used (I didn't modify both the same way :-):
cvs/grass/src.contrib/UCB/gdbase/modules/s.reclass

This one is removed now.

cvs/grass/src/scripts/contrib/s.reclass/s.reclass

This one is kept.

I have added "help" and "-help" parameters to all scripts in
src/scripts/contrib where it wasn't implemented yet
except:
d.rast.rescale, i.tasscap*, r.edge.dig, r.regression.line:
    -> these are csh and should be changed to sh
g.html2man: this is perl
s.in.garmin.sh, v.in.garmin.sh: Andreas, how to modify?
s.in.grid: awk script

----
unchanged:
r.out.bil/r.out.bil2: shall we keep this? Probably update the new
r.out.bin?

Cheers

Markus

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

Markus Neteler wrote:

I have added "help" and "-help" parameters to all scripts in
src/scripts/contrib where it wasn't implemented yet

After verification, the parameter's parser in C looks only at the
first letter after the dash. Hence you can type :

command help
command -help
command -h
command -here_is_anything_you_want

and allways get the help printed

----------------------------------------
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 Thu, Nov 23, 2000 at 12:08:49AM +0100, Andreas Lange wrote:

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.

Would it make sense to put the monitor test after parsing the command
line and checking, if "-help" was given (and how to implement that)?

Markus

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

On Thu, Nov 23, 2000 at 09:56:02AM +0000, Markus Neteler wrote:

unchanged:
r.out.bil/r.out.bil2: shall we keep this? Probably update the new
r.out.bin?

Does the new r.in.bin handle bil files (Band interleaved by line)?
There could be multiple image band in these types of files. Does gdal
support them? As long as something does...

--
Eric G. Miller <egm2@jps.net>

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

On Thu, Nov 23, 2000 at 12:08:49AM +0100, Andreas Lange wrote:

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.

Probably they check for a monitor too soon (before the call to
G_parser()).

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

Same kind of thing as above. G_parser() should be called before doing
anything else.

--
Eric G. Miller <egm2@jps.net>

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

"Eric G . Miller" wrote:

On Thu, Nov 23, 2000 at 09:56:02AM +0000, Markus Neteler wrote:
> unchanged:
> r.out.bil/r.out.bil2: shall we keep this? Probably update the new
> r.out.bin?

Does the new r.in.bin handle bil files (Band interleaved by line)?
There could be multiple image band in these types of files. Does gdal
support them? As long as something does...

Eric,

GDAL supports a few forms of raw binary labelled files. The most general
is likely the "PCI .aux labelled". For this type, you write a .aux file
header for your data. The format is described at:
http://www.pcigeomatics.com/cgi-bin/pcihlp/GDB|Supported\+File\+Formats|Raw\+Binary\+Image\+Format\+\(RAW\)|Raw\+\.aux\+Format

For instance, the following would described a binary file called test.raw
that is 300x300 with 2 bands, interleaved by line.

AuxilaryTarget: test.raw
RawDefinition: 300 300 2
ChanDefinition-1: 16U 0 2 1200 Swapped
ChanDefinition-2: 16U 600 2 1200 Swapped

The chan definition fields are:

  type: ie. 8U, 16U, 16S or 32R
  offset to first pixel: in bytes
  offset between pixels: in bytes
  offset between scanlines: in bytes
  byte order flag: Swapped for LSB (intel), or Unswapped for MSB (sun)

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerda
and watch the world go round - Rush | Geospatial Programmer for Rent

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

On Thu, Nov 23, 2000 at 09:14:10AM -0800, Eric G . Miller wrote:

On Thu, Nov 23, 2000 at 09:56:02AM +0000, Markus Neteler wrote:
> unchanged:
> r.out.bil/r.out.bil2: shall we keep this? Probably update the new
> r.out.bin?

Does the new r.in.bin handle bil files (Band interleaved by line)?
There could be multiple image band in these types of files. Does gdal
support them? As long as something does...

Yes, the new r.in.bin does:
http://www.geog.uni-hannover.de/grass/gdp/html_grass5/html/r.in.bin.html
"r.in.bin can be used to import numerous binary arrays including: etopo30,
etopo-5, Globe DEM, BIL, and GMT binary arrays (ID 1 & 2)"

Multiple image band BIL is supported by i.tape.other only (so a pain
if you just want to import a file from harddrive).

The new r.out.bin says:
" r.out.bin exports a GRASS raster to a binary array
-b
    Generate seperate BIL world and header description files"

Sounds like BIL export (single file).

Markus

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

On Wed, Nov 22, 2000 at 04:25:16PM +0000, Michel Wurtz wrote:

Michel Wurtz wrote:

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

I forget to add that those two commands also send you a mail
with the error message (because output was redirected ?).
I found that sometimes mail is sent, but is there a flag or an
environment variable to suppress that ?

Hi Michel,

to suppress mailing, touch a file $HOME/GIS_ERROR_LOG
Then it will be stored there.

Why do I know that? No idea... one day the file was there.
Should be documented!

Markus

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

Hi,

Eric G . Miller wrote:

On Thu, Nov 23, 2000 at 12:08:49AM +0100, Andreas Lange wrote:
> 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.

Probably they check for a monitor too soon (before the call to
G_parser()).

The problem is that some modules need info from the R_pad structure to
include in the commandline options/choices. And you can only open the
R_driver if a monitor is running.
I can not be more precise, look into the code for examples.
But it should be possible for the module to exit(-1) after the
G_parser() is called.

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

Same kind of thing as above. G_parser() should be called before doing
anything else.

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

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

hi,

Just a thought - POSIX compliant command line options are of the format
--option (I think this is right - case of monkey see, monkey do). how
is the -- handled by the parser? No linux at work so can't test :frowning:

cheers,
john

Michel Wurtz wrote:

Markus Neteler wrote:

> I have added "help" and "-help" parameters to all scripts in
> src/scripts/contrib where it wasn't implemented yet

After verification, the parameter's parser in C looks only at the
first letter after the dash. Hence you can type :

command help
command -help
command -h
command -here_is_anything_you_want

and allways get the help printed

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

--
----------------------------------------------------------------------
john reid e-mail john_reid@uow.edu.au
technical officer room G02, building 41
school of geosciences phone +61 02 4221 3963
university of wollongong fax +61 02 4221 4250
        
uproot your questions from their ground and the dangling roots will be
seen. more questions!
                                                       -mentat zensufi

apply standard disclaimers as desired...
----------------------------------------------------------------------

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

Hi John,

On Fri, Nov 24, 2000 at 03:24:50PM +1100, John Reid wrote:

Just a thought - POSIX compliant command line options are of the format
--option (I think this is right - case of monkey see, monkey do). how
is the -- handled by the parser? No linux at work so can't test :frowning:

unfortunately not yet fully supported (actually only --interface-description).
I am in favour of the POSIX style. It is used by the GNU Project and
many others as well.

Just checked in a new parser.c with --help as additional option
for getting help. Right now it's not a good idea to remove the
old options -help and help.

Cheers

  Jan

--
Jan-Oliver Wagner http://intevation.de/~jan/

Intevation GmbH http://intevation.de/
FreeGIS http://freegis.org/

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