Terraflux Terraflux
Download

Other

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

check.accuracy#

A check that a map of classes agrees enough with a reference: the overall agreement (the share of the cells with a value in both of the same class) or Cohen's kappa at least a minimum.

InputTypeWhat it is
maprequiredmapthe map checked (a simulated or classified map)
referencerequiredmapthe reference (observed) map
OutputTypeWhat it is
okboolwhether it passed (with warn; else it passed)
SettingTypeWhat it is
minrequirednumberthe lowest agreement allowed, 0 to 1
measuretextoverall (default) or kappa
messagetextwhat it means when it fails (the map is not accurate enough)
warnboolonly warn when it fails, the run going on (false)

check.area_kept#

A check that an area is kept from a map to another (a step to the next, the start to the end): the cells of a class (or, without one, the cells with a value) the same in both, up to a tolerance; with within (a protected area), every cell of it with a value keeps its class.

InputTypeWhat it is
beforerequiredmapthe map before
afterrequiredmapthe map after
withinmapan area where no cell may change: its cells with a value
OutputTypeWhat it is
okboolwhether it passed (with warn; else it passed)
SettingTypeWhat it is
classnumberthe class whose area is kept (the cells with a value)
tolerancenumberthe cells the area may differ by (0)
messagetextwhat it means when it fails (the area was not kept)
warnboolonly warn when it fails, the run going on (false)

check.assert#

A check that stops the run when it fails, as a test does: expression over the node's inputs in map algebra's syntax (the demand met, the areas summing to the total, the probabilities between 0 and 1); with maps among them every cell with a value must pass, else the value must be true (not 0). It fails with its message and what failed (how many cells, the value); with warn, it only warns.

OutputTypeWhat it is
okboolwhether it passed (with warn; else it passed)
SettingTypeWhat it is
expressionrequiredtextwhat must be true, e.g. abs(allocated - demand) < 1
messagetextwhat it means when it fails
warnboolonly warn when it fails, the run going on (false)
rowintegerthe row of the tables read, without maps (1)

Takes any other inputs by name (any).

check.demand#

A check that an allocation met its demand: the cells of each class of the demand in the map of the step equal to the demand of that step, up to a tolerance (in cells, or a share of the demand).

InputTypeWhat it is
landscaperequiredmapthe map allocated at the step
demandrequireddemandthe cells of each class at each step
steprequiredintegerthe step (1, 2...; 0 the start)
OutputTypeWhat it is
okboolwhether it passed (with warn; else it passed)
SettingTypeWhat it is
tolerancenumberthe cells a class may differ by (0)
relativeboolthe tolerance a share of each class's demand instead of cells (false)
messagetextwhat it means when it fails (the demand was not met)
warnboolonly warn when it fails, the run going on (false)

check.no_nodata#

A check that a map has a value where it should: no cell without a value (NaN) in the map (every layer of a stack), or only within the cells of within that have one (the study area), up to a share of the cells allowed.

InputTypeWhat it is
maprequiredanythe map or stack checked
withinmapwhere a value is expected: its cells with a value (all)
OutputTypeWhat it is
okboolwhether it passed (with warn; else it passed)
SettingTypeWhat it is
max_sharenumberthe share of the cells allowed without a value, 0 to 1 (0)
messagetextwhat it means when it fails (cells have no value)
warnboolonly warn when it fails, the run going on (false)

check.range#

A check that every value is within a range: each cell with a value of a map (every layer of a stack), or a number, between min and max (both included); the probabilities between 0 and 1, the heights above 0.

InputTypeWhat it is
valuerequiredanythe map, stack or number checked
OutputTypeWhat it is
okboolwhether it passed (with warn; else it passed)
SettingTypeWhat it is
minnumberthe lowest value allowed (no lower bound)
maxnumberthe highest value allowed (no upper bound)
messagetextwhat it means when it fails (a value is out of the range)
warnboolonly warn when it fails, the run going on (false)

value.calc#

A number or a text from the node's inputs, not a map: expression in map algebra's syntax and functions over the inputs that are numbers (true and false as 1 and 0), a table's value as table.column (of the row row); text a template of the inputs, {name} replaced by each one's value ({value} by the expression's): the path a loop writes (out/{species}_{year}.tif), the number a setting reads, the case of a switch.

OutputTypeWhat it is
valuenumberthe expression's value
texttextthe text
SettingTypeWhat it is
expressiontexte.g. area / 10000, 0.3 if year < 2010 else 0.5
texttexte.g. out/{species}_{year}.tif
rowintegerthe row of the tables read (1 the first, -1 the last; 1)

Takes any other inputs by name (any).