[GRASS-dev] correction r.mapcalc help file

Moritz Lennert mlennert at club.worldonline.be
Thu Feb 23 09:20:12 PST 2017


On 23/02/17 15:33, Paulo van Breugel wrote:
> Dear devs,
>
> In the help file of r.mapcalc it is written:
>
>> When the user enters input to /r.mapcalc/ non-interactively on the
>> command line, the program will not warn the user not to overwrite
>> existing map layers. Users should therefore take care to assign
>> program outputs raster map names that do not yet exist in their
>> current mapsets.
>
> Perhaps the description is somewhat ambiguous, but if the way I read
> this is correct, this is not the default behaviour. Perhaps the
> following describes it better:
>
>> By default it is not possible to overwrite existing raster layers, so
>> the user is expected to take care to assign program output raster
>> names that do not yet exist in their current mapset. If they want to
>> overwrite existing maps, users can use the --overwrite flag.
>
> I added a patch file in case the above is ok.

This is a leftover from history. Old r.mapcalc did not use the parser in 
the same way and did not check whether the output file existed and just 
overwrote it. Since GRASS 7 this has changed.

However, I would suggest to just completely erase the part you want to 
replace. I don't think there is a need for your replacement. Otherwise 
we would have to add such a sentence to the manual of each module that 
creates output...

Moritz


More information about the grass-dev mailing list