[GRASS-dev] r.mapcalc and g.remove --v/q issues

Glynn Clements glynn at gclements.plus.com
Sat Oct 7 19:13:33 EDT 2006

Maciej Sieczka wrote:

> Propably due to the recent work on --v and --q flags (great stuff, many
> thanks to the authors!), r.mapcalc doesn't print any progress indicator
> anymore.

AFAIK, modules are quiet by default now. If you want verbosity (e.g.
progress indication) you have to enable it.

As r.mapcalc doesn't use G_parser(), --v won't work; you would need to

There probably needs to be a "stub" version of G_parser() which
implements the built-in switches (--help, --verbose etc) but doesn't
attempt to parse the entire command line.

Changing the syntax of r.mapcalc to conform to the normal convention
would probably be too radical a change. While we can fix our own
scripts, there are likely to be a lot of home-grown scripts which
would be broken (not to mention users who are accustomed to using the
existing syntax from the command line).

> Also g.remove doesn't return any info if trying to remove a
> non-existant map. If used with --v it will print eg.:
> $ g.remove rast=dummy --v
> REMOVE [dummy]
> raster MISSING
> header MISSING
> category MISSING
> color MISSING
> history MISSING
> misc MISSING
> fcell MISSING
> g3dcell MISSING
> as it used before introducing --q and --v. But if --v is not
> explicitely set (default), it will remain silent.
> It should print "ERROR: raster map <dummy> not found" instead.

Specifying a map which doesn't exist (one with no elements) has never
been an error. At most, it should generate a warning if no elements
are found.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list