![]() |
![]()
| ![]() |
![]()
NAMEr.mapcalc.simple - Calculates a new raster map from a simple r.mapcalc expression. KEYWORDSraster, algebra, simple SYNOPSISr.mapcalc.simple
Flags:Parameters:
DESCRIPTIONr.mapcalc.simple provides a wrapper to r.mapcalc. Up to 6 maps can be combined using simple expressions. The general syntax for the expression follows r.mapcalc expression format, for example, A + B or exp(A + B) are valid. The variables A, B, ..., F represent raster maps which are provided as options a, b, ..., f. The result name, i.e. the output raster map, is provided using the option output and, unlike r.mapcalc it is not part of the expression. This module is meant for convenience (for users and programmers) while the r.mapcalc module is a better choice for more complex expressions and advanced usage. NOTESDifferences to r.mapcalc module:
EXAMPLESBasic examplesr.mapcalc.simple expression="0" output=zeros r.mapcalc.simple expression="1" output=ones r.mapcalc.simple expression="2" output=twos r.mapcalc.simple expression="A + B + C" a=zeros b=ones c=twos output=result1 r.mapcalc.simple expression="(A * B) / 2 + 3 * C" a=zeros b=ones c=twos output=result2 Figure: r.mapcalc.simple graphical user interface Example expressionsAddition:
A + B No spaces around operators are not recommended for readability,
but allowed in the expression:
A+B More complex expression with a function: exp(A+C)+(B-2)*7 SEE ALSOr.mapcalc, r3.mapcalc, t.rast.mapcalc, g.region AUTHORSVaclav Petras, NCSU GeoForAll Lab
SOURCE CODEAvailable at: r.mapcalc.simple source code (history) Latest change: Friday Dec 27 01:53:45 2024 in commit: bd53b2448f13719ddb4f5b4d5cf373f8c259de0b Main index | Raster index | Topics index | Keywords index | Graphical index | Full index © 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual
|