NAME

mapcalculator.sh - TCLTK-Frontend for r.mapcalc

SYNOPSIS

mapcalculator.sh [help=[help,man]] [expert=expert] A_MAP=[map ] B_MAP=[map]...

DESCRIPTION

mapcalculator.sh is a bash-script usally called via mapcalculator in TCLTKGRASS. It creates a r.mapcalc call from the parameters you choose in mapcalculator. If you want to use mapcalc on the commandline you should use the original r.mapcalc command.
In TCLTKGRASS you can choose up to six maps [entries A - F] to be included in the calculation. Then you have to enter a formula and a name for the resulting raster map. You won't receive a warning, if you choose the name of an allready existing raster map, but you can protect your files from overwriting by activating the appropriate checkbox.
You can create a calculation formula in the field formula like this:
A+C or (more complex:) exp(A+C)+(B-2)*7.
A, B, C, etc. are your choosen raster maps. You must not insert the output file:

Right: A+B
Wrong: newfile = A+ B

Use no blanks! Blanks are inserted by the script to devide the map names from the rest of the formula.

The script won't check the syntax or logic of the formula and you will only receive the error messages from r.mapcalc, if anything went wrong. For details on creating a formula see the r.mapcalc manual page (man r.mapcalc).

BUGS

It is not possible to choose maps from different mapsets with the raster button. But you can choose maps from different mapsets by entering the name map@mapset in any of the map fields [A-E].

You may have difficulties to calculate formulas containing neighborhood modifier. The only way to use neighborhood modifier is entring them directly into the formula field:

A+B*map_with_modifier\[x,y\]
where map_with_modifier is the name of your map. The name of your map should not contain any uppercase A - F, because they will be interpreted as raster map entries. Don't forget to mask the brackets with backslashes, or you will receive errormessages form TCLTKGRASS.

SEE ALSO

r.mapcalc

AUTHOR

R. Brunzema

Last changed: $Date$