[GRASS-user] how to use r.mapcalc in GRASS

Veronica Andreo veroandreo at gmail.com
Mon Jul 2 05:28:11 PDT 2018


Hi Marion,

Don't know how is it from QGIS, but in the native GRASS GIS we first se the
computational region with g.region [0] and then run r.mapcalc as:

r.mapcalc expression="diff = map1 - map2"

HTH,
Vero

[0] https://grass.osgeo.org/grass74/manuals/g.region.html

El lun., 2 jul. 2018 a las 12:18, marion-brunet (<marion-brunet at sfr.fr>)
escribió:

> Hello,
>
> I am trying to calculate the difference between two raster layers. For
> that, I am using GRASS in QGIS. I use the command r.mapcalc. In the field
> "expression to evaluate" I wrote
> r.mapcalc expression=diff =TIN_12_17-TIN_06_18
> TIN_12_17 and TIN_06_18 are the names of my two rasters.
> I then select the region on my canevas.
> When I click "run" I don't have any error but no file is created in my
> project. I would like to have a new raster file with the difference of the
> two previous ones.
>
> What am I doing wrong?
>
> Thank you,
> Marion_______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180702/fc8682c8/attachment.html>


More information about the grass-user mailing list