#3858: r.mapcalc - Add warning when the same map is used both as an input and an output -------------------------+------------------------- Reporter: Hygsson | Owner: grass-dev@… Type: enhancement | Status: new Priority: normal | Milestone: 7.6.2 Component: Raster | Version: unspecified Keywords: r.mapcalc | CPU: x86-64 Platform: MSWindows 7 | -------------------------+------------------------- A map cannot be used both as an input and as an output as in this invalid expression `oldmap = oldmap + 1`, instead a subsequent rename using `g.rename` is needed when the same name is desired:
{{{ r.mapcalc "newmap = oldmap + 1" g.rename raster=newmap,oldmap }}} While `(oldmap = oldmap + 1)` may work on Linux, it will result in error on Windows. As Wenzeslaus suggested in ticket:3857#comment:1, the solution might be to check inputs and outputs beforehand and add a warning for Linux and an error message for MS Windows. -- Ticket URL: <https://trac.osgeo.org/grass/ticket/3858> GRASS GIS <https://grass.osgeo.org>
_______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/grass-dev