[GRASS-user] Variables in r.mapcalc other than raster?

Glynn Clements glynn at gclements.plus.com
Tue Jan 22 23:07:07 EST 2008


Roland Pape wrote:

> I have to perform some complex calculations on several hundreds of maps 
> using a shell script. A set of variables would ease the task, therefore 
> my question: Is there any possibility to use a set of predefined 
> variables (no maps!) in r.mapcalc? - It seems to me as if it is always 
> looking for maps and consequently states "i is not a map".

Where does r.mapcalc get the expression from? If it's passed as a
command-line argument, the shell will perform variable substitution
within a double-quoted string. The shell will also perform
substitution within here documents.

If the expression is being read from a file, you'll need to arrange
for the substitutions to be performed using e.g. sed.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-user mailing list