rio calc
A raster data calculator
Evaluates an expression using input datasets and writes the result to a new dataset.
Command syntax is lisp-like. An expression consists of an operator
or function name and one or more strings, numbers, or expressions
enclosed in parentheses. Functions include read
(gets a raster
array) and asarray
(makes a 3-D array from 2-D arrays).
Example:
The command above produces a 3-band GeoTIFF with all values scaled by 0.95 and incremented by 2.
The command above produces a 3-band RGB GeoTIFF, with red levels incremented by 125, from the single-band input.
The maximum amount of memory used to perform caculations defaults to 64 MB. This number can be increased to improve speed of calculation.
rio calc [OPTIONS] COMMAND INPUTS... OUTPUT
Options
- -o, --output <output>
Path to output file (optional alternative to a positional arg).
- -f, --format, --driver <driver>
Output format driver
- --name <name>
Specify an input file with a unique short (alphas only) name for use in commands like “a=tests/data/RGB.byte.tif”.
- -t, --dtype <dtype>
Output data type.
- Options:
ubyte | uint8 | uint16 | int16 | uint32 | int32 | float32 | float64
- --masked, --not-masked
Evaluate expressions using masked arrays (the default) or ordinary numpy arrays.
- --overwrite
Always overwrite an existing output file.
- --mem-limit <mem_limit>
Limit on memory used to perform calculations, in MB.
- --co, --profile <NAME=VALUE>
Driver specific creation options. See the documentation for the selected output driver for more information.
Arguments
- COMMAND
Required argument
- INPUTS... OUTPUT
Required argument(s)