GRASS logo

Note: This addon document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade your GRASS GIS installation, and read the current addon manual page.

NAME

r.mapcalc.tiled - Runs r.mapcalc in parallel over tiles.

KEYWORDS

raster, algebra, tiling

SYNOPSIS

r.mapcalc.tiled
r.mapcalc.tiled --help
r.mapcalc.tiled expression=string [output=name] width=integer height=integer overlap=integer processes=integer [mapset_prefix=string] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

expression=string [required]
Expression to send to r.mapcalc
output=name
Name of raster output map resulting from expression
width=integer [required]
Width of tiles (columns)
Default: 1000
height=integer [required]
Height of tiles (rows)
Default: 1000
overlap=integer [required]
Overlap of tiles
Default: 0
processes=integer [required]
Number of r.mapcalc processes to run in parallel
Default: 1
mapset_prefix=string
Mapset prefix

Table of contents

DESCRIPTION

r.mapcalc.tiled cuts a raster input map into tiles and runs r.mapcalc over these tiles before patching the result together into a single output raster map.

The user provides the map calculation expression. The output map name is automatically extracted from that expression by extracting the string before the '='. If the expression is more complex, the user can also provide the the output map name with the parameter output

Tiles can be defined with the width, height and overlap parameters. If processes is higher than one, these tiles will be processed in parallel.

The mapset_prefix parameter ensures that the temporary mapsets created during the tiled processing have unique names. This is useful if the user runs r.mapcalc.tiled several times in parallel (e.g. in an HPC environment).

NOTES

EXAMPLE

Run r.mapcalc over tiles with size 1000x1000 using 4 parallel processes (North Carolina sample dataset):
 
g.region raster=ortho_2001_t792_1m
r.mapcalc.tiled expression="bright_pixels = if(ortho_2001_t792_1m > 200, 1, 0)" \
   width=1000 height=1000 processes=4

SEE ALSO

r.mapcalc

AUTHOR

Moritz Lennert

SOURCE CODE

Available at: r.mapcalc.tiled source code (history)

Latest change: Mon Jun 28 07:54:09 2021 in commit: 1cfc0af029a35a5d6c7dae5ca7204d0eb85dbc55


Note: This addon document is for an older version of GRASS GIS that will be discontinued soon. You should upgrade your GRASS GIS installation, and read the current addon manual page.

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2023 GRASS Development Team, GRASS GIS 7.8.8dev Reference Manual