[GRASS-dev] correction r.mapcalc help file

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.

Best wishes,

Paulo

(attachments)

r.mapcalc.patch (1010 Bytes)

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

On February 23, 2017 18:20:18 Moritz Lennert <mlennert@club.worldonline.be> wrote:

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.

Yes, and a very good change it was

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...

Yes, think you are right, just remove the section

Moritz

Le Thu, 23 Feb 2017 20:28:59 +0100,
Paulo van Breugel <p.vanbreugel@gmail.com> a écrit :

On February 23, 2017 18:20:18 Moritz Lennert
<mlennert@club.worldonline.be> wrote:

[...]
[...]
[...]
[...]
[...]
[...]
[...]

Yes, and a very good change it was
[...]

Yes, think you are right, just remove the section

Done in r70692 (trunk) and r70693 (release72).

Moritz