[GRASS5] Re: [GRASSLIST:4932] Re: overwriting a raster layer with g.rename
paul-grass at stjohnspoint.co.uk
Mon Nov 11 14:37:04 EST 2002
On Mon, 11 Nov 2002, Eric G. Miller wrote:
> 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."
> > 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
This also explains the strange behaviour of the v.line2area and
v.area2line scripts, which use g.rename without the -o flag. When I first
started using GRASS this puzzled me and I didn't know what to look for; it
would be more obvious now that I'm a little bit more experienced but I
haven't used them for a while.
So somebody should update them (in src/scripts/contrib/v.line2area) to use
the -o flag when they are overwriting the original file. And I suppose if
someone changes the functionality of a command they should check which
other programs and scripts use it (as well as updating the man page)?
More information about the grass-dev