[GRASS-dev] [GRASS GIS] #3431: r.mapcalculator script for QGIS processing
GRASS GIS
trac at osgeo.org
Sun Nov 4 19:50:58 PST 2018
#3431: r.mapcalculator script for QGIS processing
-------------------------+-------------------------------------------------
Reporter: neteler | Owner: wenzeslaus
Type: | Status: new
enhancement |
Priority: normal | Milestone: 7.6.0
Component: Python | Version: 7.2.2
Resolution: | Keywords: r.mapcalculator, r.mapcalc,
CPU: | r3.mapcalculator, r3.mapcalc, QGIS
Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Comment (by wenzeslaus):
See sandbox for source code (Subversion history preserved, but it is a
complete rewrite anyway):
source:sandbox/wenzeslaus/r.mapcalculator (r73642)
{{{
Usage:
r.mapcalculator [-sqc] expression=string [a=name] [b=name] [c=name]
[d=name] [e=name] [f=name] output=value [seed=value] [--help]
[--verbose] [--quiet] [--ui]
Flags:
-s Generate random seed (result is non-deterministic)
-q Quote the map names
-c Case sensitive variable names
Parameters:
expression Formula (e.g. A-B or A*C+B)
a A
b B
c C
d D
e E
f F
output Name for output raster map
seed Seed for rand() function
}}}
{{{
r.mapcalculator expression="0" output=zeros
r.mapcalculator expression="1" output=ones
r.mapcalculator expression="2" output=twos
r.mapcalculator expression="(A * B) / 2 + 3 * C" a=zeros b=ones c=twos
output=result2
}}}
If you don't have sandbox repo, you can install also using:
{{{
g.extension r.mapcalculator
url=https://trac.osgeo.org/grass/browser/sandbox/wenzeslaus/r.mapcalculator
}}}
I tried to cover in the documentation what are the differences to 5/6
version and r.mapcalc. Let me know what you think!
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3431#comment:7>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list