Terraflux Terraflux
Download

Map algebra

5 operators. Inputs marked required must be connected or given; the others have defaults.

stack.classes#

A stack whose layers are named by class ("1", "2"...) or transition ("1_to_3") as the suitability of each class or the probability of each transition (e.g. computed elsewhere and read from a file).

InputTypeWhat it is
stackrequiredstacklayers named by class
OutputTypeWhat it is
stackstacka layer per class

stack.extract_layer#

Take one layer out of a stack as a map, by its name or its 0-based number: a band of rasters (the bands of a file), a layer of a stack (prioritize.evaluate's ferrier: total), a step of the series of a loop (1..).

InputTypeWhat it is
stackrequiredrastera stack, the series of maps of a loop or rasters
OutputTypeWhat it is
mapmapthe layer
SettingTypeWhat it is
layerrequiredanythe layer's name, or its 0-based number

stack.of#

Maps of one grid as a stack, a layer each named as its input (any names: the features of a prioritization, the drivers of a model), in the order of their names. A name 1_to_2 makes the layer a transition's (a probability for dinamica.step), a name 1 a class's (a suitability).

OutputTypeWhat it is
stackstackthe maps' stack

Takes any other inputs by name (map).

stack.reduce#

A statistic of a stack's layers (or of a series of maps) at every cell, as terra's app or a cell statistics tool: the mean, standard deviation, minimum, maximum, median, sum, count of layers with a value, majority (the mode), a percentile... over the layers with a value at the cell (none: missing), or the layer (1.., in the stack's order) of the largest or smallest value (argmax, argmin; a tie: the first).

InputTypeWhat it is
mapsrequiredanya stack or a series of maps
OutputTypeWhat it is
mapmapthe statistic at every cell
SettingTypeWhat it is
stattextmean (default), std, var, min, max, range, median, sum, count, nodata, majority, minority, unique, percentile_

, argmax, argmin

stack.set#

A stack with a map in the layer of a name (replacing the layer of that name, else added at the end): a dynamic variable in place of the static driver of the same name.

InputTypeWhat it is
stackrequiredstackthe stack
maprequiredmapthe map
OutputTypeWhat it is
stackstackthe stack with the map
SettingTypeWhat it is
namerequiredtextthe layer's name