[GRASS-user] result from g.copy when layer exists

Glynn Clements glynn at gclements.plus.com
Wed Jul 17 15:01:45 PDT 2013


Rainer M Krug wrote:

> I am a bit irritated,  ut maybe I don't dee the reasoning behind this:'
> 
> ,----
> | RASS 7.0.svn (grass):~ > g.copy rast=MASK,tmp
> | WARNING: <tmp> already exists
> | [Raster MASK present]
> | GRASS 7.0.svn (grass):~ > 
> `----
> 
> If the layer already exists, shouldn't the command give actually an
> error and not only a warning?
> 
> A warning implies for me that the command worked, but maybe something
> unexpected could have happened (or happened) - but this one clearly did
> not work, as the layer has not been copied?

In GRASS, errors are fatal; the program will be terminated as soon as
the error message has been printed.

Each of g.copy's options accept an arbitray number of
source+destination pairs, and the various options aren't mutually
exclusive (e.g. a single invocation can copy both raster and vector
maps).

If it can't perform a particular copy for any reason, it generates a
warning then moves on to the next item.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list