[GRASSLIST:4931] overwriting a raster layer with g.rename

Dear all,

I am puzzled by the behaviour of g.rename. The Note in the man pages say:

"However, g.rename will allow the user to overwrite other existing files in the current
mapset by making the new file name that of an already existing file."

I used this property in the following sequence:

map1 produced by some function
map2 produced by some other function

r.patch input=map1,map2 output=map3;
g.rename rast=map3,map2;

Instead of working smoothly I get the answer:
<map2> already exists in mapset <blah>

Is there a particular command switch to overwrite the file?

Thanks for hints or ways around?

Thomas

Thomas Dewez
PhD Student
Dept Geography & Earth Sciences
Brunel University (West London)
Uxbridge UB8 3PH, Mddx
United Kingdom

Phone: +44-(0)1895-203215
Fax: +44-(0)1895-203217

e-mail: thomas.dewez@brunel.ac.uk

On Mon, Nov 11, 2002 at 11:50:51AM -0000, Thomas Dewez wrote:

Dear all,

I am puzzled by the behaviour of g.rename. The Note in the man pages say:

"However, g.rename will allow the user to overwrite other existing files in the current
mapset by making the new file name that of an already existing file."

[snip]

Instead of working smoothly I get the answer:
<map2> already exists in mapset <blah>

Is there a particular command switch to overwrite the file?

You want the '-o' flag, for overwrite...

This is a bug against the man page. Sometimes people forget to update
the manual... Using the "help" argument to most commands will give you
the definitive brief summary of what flags and arguments the command
takes.

--
static const char signature =
  "Copyright (c) 2002 Eric G. Miller <egm2@jps.net>";