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

Glynn Clements glynn at gclements.plus.com
Tue Oct 10 00:14:26 EDT 2006

Sören Gebbert wrote:

> i just tested g.remove (lates grass cvs version).
> If i try to remove a non existent map i get this warning:
> GRASS 6.3.cvs > g.remove rast=huch
> WARNING: <huch> nothing removed
> I think this is a wrong warning, because map "huch" does not exist.
> Maybe i'm doing something wrong?

So far as g.remove is concerned, maps don't "exist" (or not) as
monolithic entities. A map (or any other entity type, e.g. stored
regions) can have multiple elements; e.g. a raster map can have any or
all of the elements:

	cell cellhd cats colr hist cell_misc fcell g3dcell

Previously, g.remove would simply tell you whether the element was
removed, missing, or removal failed. If a map didn't exist at all, it
would just print "MISSING" for every element.

Now, it prints nothing if one or more elements exist, and the above
warning if no elements exist.

The basic behaviour is correct, but we might want to think about the
exact message. The above might be interpreted as meaning that
something which exists wasn't removed, when it actually signifies that
nothing was removed, either because there wasn't anything to remove or
because removal failed.

Note that if an element exists but removal fails, you get a separate
warning for each failed removal.

Glynn Clements <glynn at gclements.plus.com>

More information about the grass-dev mailing list