[GRASS-user] Clip/Extract Rasters using a vector

Hamish hamish_b at yahoo.com
Mon Sep 20 18:41:22 EDT 2010


Andrew wrote:
> Here is the error:
> GRASS 6.4.0RC6 (MacrophytesGIS):~/grass/MacrophytesGIS/PERMANENT >
..
> natemp20092010=mynatempnewrast + 0 | r.mapcalc
..
> bash: +: command not foundsyntax error, unexpected $end, 
> expecting NAME or STRING
> Parse error

you need an echo:

  GRASS> echo "natemp20092010=mynatempnewrast + 0" | r.mapcalc

less awkward would be:

  GRASS> r.mapcalc "natemp20092010 = mynatempnewrast + 0"

(although I'm not really sure what the point of the +0 is)


in GRASS 7 you'll need a space around the "=", may as well get
in the habit of doing that now.


Hamish



      


More information about the grass-user mailing list