I use in my calculations something like this:
last_round=07
Y=${last_round}
current_round=08
X=${current_round}
r.mapcalc ez_${X}_01 ="if(isnull(dgm_top_${X}),ez_${Y},ez_${Y}+20)"
r.mapcalc ez_${X}_02 ="if(isnull(dgm_cut_${X}),ez_${X}_01,ez_${X}_01-10)"
Maybe you could define your variables in this way.
To define a command as a variable I use i.e.
bg1=`echo "d.rast ez_${Y}"`
${bg1} starts it.
cheers
om shantih
Philipp
Roland Pape schrieb:
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
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
