Hello,
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".
Is there any way to do this?
Thanks,
Roland
On 22/01/08 12:07, Roland Pape wrote:
Hello,
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".
Is there any way to do this?
Have you checked http://grass.itc.it/gdp/raster/mapcalc-algebra.pdf ? There is a section on temporary variables, but I'm not sure if these aren't also "map" variables.
Moritz
Hello Moritz,
unfortunately, the temporary variables there also seem to be "map" variables...
Moritz Lennert wrote:
On 22/01/08 12:07, Roland Pape wrote:
Hello,
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".
Is there any way to do this?
Have you checked http://grass.itc.it/gdp/raster/mapcalc-algebra.pdf ? There is a section on temporary variables, but I'm not sure if these aren't also "map" variables.
Moritz
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@gclements.plus.com>
Hi,
thanks to all for help!
As recommended in the manual, I put single quotes around my expressions and got "invalid map" for any "no-map" variables. Using double quotes instead solved the problem. - Sometimes it is rather simple...
Best regards,
Roland