prioritize.actions
Multi-action planning as a mixed integer program (Salgado-Rojas et al. 2020): which planning units to monitor and which actions against which threats to take in them, so that the features recover (or are kept) to their targets at the least cost (minimizeCosts), or recover the most within a budget (maximizeBenefits); the boundary of the units and of every threat's actions weighed; linear, quadratic or cubic responses. The model of Salgado-Rojas et al. with its checks and defaults, solved by landschaft's closure engine and HiGHS.
| Input | Type | What it is |
purequired | table | planning units: id, monitoring_cost, status (0, 2 locked in, 3 out) |
featuresrequired | table | id, target_recovery, target_conservation (0) |
dist_featuresrequired | table | the features' amounts: pu, feature, amount |
threatsrequired | table | id, blm_actions (the weight of its actions' boundary; 0) |
dist_threatsrequired | table | the threats in the units and the actions against them: pu, threat, amount, action_cost, status |
sensitivity | table | which features each threat harms: feature, threat, delta1-delta4 (default every feature to every threat) |
boundary | table | id1, id2, boundary (shared lengths) |
| Output | Type | What it is |
monitoring | table | id and solution of every planning unit |
actions | table | pu, threat and solution of every action |
summary | table | per unit: its actions by threat, conservation (a feature kept without actions), connectivity (monitored for neither): getActions() |
result | table | the objective, the solver's gap and status (1 optimal) |
cost | table | the monitoring cost and every threat's actions' cost |
benefit | table | every feature's benefit: conservation, recovery, total |
local | table | every (unit, feature)'s benefit |
potential | table | every feature's distribution and the most benefit |
connectivity | table | with boundary data: the boundary of the monitored units and of every threat's actions |
| Setting | Type | What it is |
model | text | minimizeCosts (default) or maximizeBenefits |
budget | number | maximizeBenefits: the most the units and actions may cost |
blm | number | the weight of the monitored units' boundary (0) |
curve | integer | the features' response: 1 linear (default), 2, 3 |
segments | integer | curve 2, 3: pieces of its linear approximation (3) |
gap | number | the relative optimality gap (default 0) |
time_limit | number | seconds (default none) |
prioritize.actions_raster
Multi-action planning on rasters (landschaft's actions_raster_data): the planning units are the cells with a monitoring cost, a layer per feature its amounts and per threat its intensity (> 0 where it occurs; the action there removes it), the actions' costs numbers or maps; the tables of prioritize.actions built as landschaft builds them (relative targets shares of what each feature has where a threat harms it and where none does), solved as prioritize.actions solves them, the monitored cells and every threat's actions as maps.
| Input | Type | What it is |
monitoring_costrequired | map | the cost of monitoring every cell (no value: not a unit) |
featuresrequired | stack | the features' amounts, a layer each (no value 0) |
threatsrequired | stack | the threats' intensities, a layer each (> 0 where it occurs) |
maps | stack | the maps of the actions' costs, named in action_cost |
locked_in | map | cells that must be monitored (not 0) |
locked_out | map | cells that must not be monitored (not 0) |
sensitivity | table | which features each threat harms: feature, threat (1-based, in the layers' order), delta1-delta4 (default every feature to every threat) |
| Output | Type | What it is |
maps | stack | the monitored cells (monitoring) and every threat's actions (by its name), 0/1 |
pu | table | the planning units built: id, monitoring_cost, status |
dist_threats | table | the actions built: pu, threat, amount, action_cost |
monitoring | table | id and solution of every planning unit |
actions | table | pu, threat and solution of every action |
summary | table | per unit: its actions by threat, conservation (a feature kept without actions), connectivity (monitored for neither): getActions() |
result | table | the objective, the solver's gap and status (1 optimal) |
cost | table | the monitoring cost and every threat's actions' cost |
benefit | table | every feature's benefit: conservation, recovery, total |
local | table | every (unit, feature)'s benefit |
potential | table | every feature's distribution and the most benefit |
connectivity | table | with boundary data: the boundary of the monitored units and of every threat's actions |
| Setting | Type | What it is |
action_cost | any | the cost of acting against every threat: a number or a map's name (one of maps) for all, a list in the threats' order or {threat: ...} (default 1) |
target_recovery | any | the features' recovery targets: a number, a list in the features' order or {feature: ...} |
target_conservation | any | the features' conservation targets, the same |
relative | bool | the targets are shares (0-1) of the feature where threats harm it (recovery) or none does (conservation); default true |
blm_actions | any | the weight of every threat's actions' boundary (0) |
boundary | bool | the cells' shared edges as boundary data (for the blms) |
model | text | minimizeCosts (default) or maximizeBenefits |
budget | number | maximizeBenefits: the most the units and actions may cost |
blm | number | the weight of the monitored units' boundary (0) |
curve | integer | the features' response: 1 linear (default), 2, 3 |
segments | integer | curve 2, 3: pieces of its linear approximation (3) |
gap | number | the relative optimality gap (default 0) |
time_limit | number | seconds (default none) |
prioritize.adjacency_matrix
1 for every two adjacent planning units (landschaft's adjacency_matrix): cells with data sharing an edge (4 directions) or a corner too (8); polygons that meet.
| Input | Type | What it is |
unitsrequired | any | the planning units: a map or a stack (cells), or polygons |
| Output | Type | What it is |
table | table | i, j, x: the units (1..) and their value |
| Setting | Type | What it is |
directions | integer | 4 (default) or 8, for rasters |
prioritize.binary_stack
A 0/1 layer per zone from a map of zone numbers (landschaft's binary_stack), for the locked-in constraints of zones (an existing zoning plan); cells with 0 are in no zone, missing ones stay missing.
| Input | Type | What it is |
zonesrequired | map | zone numbers 1, 2... (0: none) |
| Output | Type | What it is |
stack | stack | a layer per zone, by name |
| Setting | Type | What it is |
names | any | the zones' names in the order of their numbers (default 1, 2...) |
prioritize.boundary_matrix
The length of the boundary every two planning units share, and every unit's perimeter on the diagonal (landschaft's boundary_matrix): raster cells with data share xres with those above and below and yres with those left and right; polygons their common paths, rounded to 8 decimals.
| Input | Type | What it is |
unitsrequired | any | the planning units: a map or a stack (cells), or polygons |
| Output | Type | What it is |
table | table | i, j, x: the units (1..) and their value |
prioritize.calibrate
The calibration of trade-offs (Hanson et al. 2025): candidate solutions of a problem (given as to prioritize.optimize, without the penalty traded off) over a trade-off parameter. blended: the problem with a range of penalty weights (default 9 over 1/100 to 100 times Cohon et al.'s penalty); hierarchical: the least penalty within cost thresholds above the least cost solution's; pareto: the least total shortfall of the targets within budgets; cohon: the penalty of Cohon et al. (1979) from the two ideal solutions. Every candidate's cost and criterion (boundary, connectivity, linear penalty or shortfall), and the candidates TOPSIS and the knee of the curve choose. The solves run in parallel.
| Input | Type | What it is |
features | stack | the features' amounts, a layer each |
cost | map | the cost of each cell (no value: not a planning unit) |
polygons | vector | planning units of polygons (with cost_column; with zones, one per zone): the features' amounts summed over them exactly (exactextract), their shared boundaries and adjacency from the geometries |
pu | table | tables instead of maps: as prioritize.optimize's |
spec | table | Marxan-style: the features (id) |
rij | table | Marxan-style: the amounts (pu, species, amount) |
locked_in | map | the units that must be selected (not 0) |
locked_out | map | the units that may not be selected (not 0) |
targets | table | targets by hand, as prioritize.optimize's |
boundary_data | table | a boundary matrix of every unit: i, j, x (1-based) |
connectivity_data | table | a symmetric connectivity matrix: i, j, x |
asym_connectivity_data | table | a connectivity matrix: i, j, x |
adjacency_data | table | an adjacency matrix of every unit: i, j, x |
penalty_data | map | the linear penalty: a value per cell |
constraint_data | map | a linear constraint: a value per cell |
bounds | table | manual bounds, as prioritize.optimize's |
status | table | manual locked units, as prioritize.optimize's |
| Output | Type | What it is |
table | table | per candidate: value (the penalty, cost threshold or budget), cost, the criterion (boundary, connectivity, asym_connectivity, linear or shortfall; pareto: met, the targets met), objective, optimal (1), gap, topsis_score, topsis and knee (1: chosen; pareto: efficient). cohon: the two ideal solutions' cost and criterion and the penalty |
selection | table | per unit: its cell or row (1..) and every candidate's share |
solutions | stack | maps: every candidate, a layer each |
best | map | maps: the candidate TOPSIS chooses |
| Setting | Type | What it is |
approach | text | blended (default), hierarchical, pareto or cohon |
penalty | text | the penalty traded off against the cost: boundary (default), connectivity, asym_connectivity, linear |
values | any | the candidates: blended's penalties, hierarchical's cost thresholds, pareto's budgets |
n | integer | the candidates without values (blended 9, pareto 10) |
inflation | any | hierarchical without values: the thresholds the least cost x (1 + these), rounded up (1e-5 to 4) |
objective | text | the problem's objective (min_set; pareto: any with targets) |
relative_targets | any | as prioritize.optimize's |
absolute_targets | any | as prioritize.optimize's |
loglinear_targets | any | as prioritize.optimize's |
feature_weights | any | as prioritize.optimize's |
decisions | text | as prioritize.optimize's |
edge_factor | number | the boundary: the weight of edges to no unit (0.5) |
cost_column | text | tables: as prioritize.optimize's |
features | any | tables: as prioritize.optimize's |
penalty_column | text | tables: pu's column of the linear penalty |
spatial | any | other penalties and constraints, as prioritize.optimize's |
gap | number | the candidates' optimality gap (default 0.1) |
ideal_gap | number | the least cost and Cohon's ideal solutions' gap (0) |
time_limit | number | seconds per solve (default none: a strong penalty can make a solve take hours; the candidates stopped by it are marked not optimal, with their gap) |
prioritize.coarsen
A problem's rasters on blocks of factor x factor cells (landschaft's coarsen, for continental problems: solve the coarse problem, then prioritize.refine the selection): every block's cost and amounts the sums of its cells with a cost (a block without any has none).
| Input | Type | What it is |
costrequired | map | the cost of the planning units |
featuresrequired | any | the features' amounts: a stack or a map |
| Output | Type | What it is |
cost | map | the cost of the blocks |
features | stack | the amounts of the blocks |
| Setting | Type | What it is |
factorrequired | integer | cells per side of a block |
prioritize.connectivity_matrix
The connectivity of adjacent planning units (landschaft's connectivity_matrix): the length of their shared boundary times the mean of y in the two (a map on the units' grid; for polygons a map averaged over each, exactextract's, or an attribute).
| Input | Type | What it is |
unitsrequired | any | the planning units: a map or a stack (cells), or polygons |
y | map | the map of y |
| Output | Type | What it is |
table | table | i, j, x: the units (1..) and their value |
| Setting | Type | What it is |
column | text | for polygons: the attribute of y |
prioritize.decay_connectivity
Connectivity from the distances between planning units as a dispersal probability (landschaft's decay_connectivity, Conefor's negative exponential): exp(-ln 2 d / median), 0.5 at the median dispersal distance, left out below a probability, 0 on the diagonal and for pairs out of reach. The distances from cost.distance, cost.commute_distance or circuits between unit points.
| Input | Type | What it is |
distancesrequired | table | a row per unit (its number first, or not), a column per unit |
| Output | Type | What it is |
table | table | i, j, x: the probabilities kept (connectivity_data) |
| Setting | Type | What it is |
medianrequired | number | the median dispersal distance |
min_probability | number | the least kept (default 0.001) |
prioritize.evaluate
The evaluation of a solution (Hanson et al. 2025): the units selected, their cost and boundary; how much of each feature it holds; with targets, their coverage and Ferrier et al.'s irreplaceability of the units selected; the rarity-weighted richness of the units selected. The problem is given as to prioritize.optimize (maps or tables), the solution as a map or as prioritize.optimize's selection; the connectivity of the solution with connectivity matrices.
| Input | Type | What it is |
features | stack | the features' amounts, a layer each |
cost | map | the cost of each cell (no value: not a planning unit) |
polygons | vector | planning units of polygons (with cost_column; with zones, one per zone): the features' amounts summed over them exactly (exactextract), their shared boundaries and adjacency from the geometries |
pu | table | tables instead of maps: as prioritize.optimize's |
spec | table | Marxan-style: the features (id) |
rij | table | Marxan-style: the amounts (pu, species, amount) |
solution | map | the share of each unit selected |
zone_costs | stack | zones: as prioritize.optimize's |
zone_features | stack | zones: as prioritize.optimize's |
contribution_maps | stack | zones: as prioritize.optimize's |
zone_solution | stack | zones: the share of each unit in every zone, a layer per zone (or the selection: solution_) |
selection | table | the solution as a table: prioritize.optimize's selection (unit, solution), or a column (solution, solution_1 or the only one) with a row per unit |
targets | table | targets by hand, as prioritize.optimize's |
boundary_data | table | a boundary matrix of every unit: i, j, x (1-based) |
connectivity_data | table | a symmetric connectivity matrix: i, j, x |
asym_connectivity_data | table | a connectivity matrix: i, j, x |
| Output | Type | What it is |
summary | table | the units selected (n), their cost and boundary (no value: tables without a boundary matrix), and with the matrices their connectivity and asym_connectivity |
representation | table | per feature: its total, the amount held and its share |
coverage | table | per target: its feature, met (1), the total, the target, the amount held and the shortfall, and these relative to the total |
units | table | per unit: its cell or row (1..), the solution, the rarity-weighted richness, Ferrier's (ferrier_, ferrier_total), the replacement cost and the rank importance when asked |
ferrier | stack | maps: Ferrier's irreplaceability per feature and in total |
rarity | map | maps: the rarity-weighted richness of the units selected |
replacement | map | maps: each selected unit's replacement cost |
rank | map | maps: each selected unit's rank importance |
rank_budgets | table | rank: the budgets and the objective at each |
extinction_risk | table | with extinction_z: per feature its share held, z and risk 1 - share^z; their sum last |
| Setting | Type | What it is |
relative_targets | any | a share of each feature's total (or one for all) |
absolute_targets | any | an amount per feature |
loglinear_targets | any | as prioritize.optimize's |
edge_factor | any | the boundary: the weight of edges to no unit (0.5; zones: one or one per zone) |
boundary_zones | any | zones: the boundary's zones matrix (default the identity) |
connectivity_zones | any | zones: the connectivity's zones matrix |
asym_connectivity_zones | any | zones: the asymmetric connectivity's |
manual_targets | any | targets by hand with their zones, as prioritize.optimize's |
feature_names | any | zones: the features' names |
contribution | any | zones: as prioritize.optimize's |
rescale | bool | the importances rescaled to 0.01-1 (default true) |
replacement | bool | the replacement cost of every unit selected (a solve without each) |
rank | integer | the rank importance with this many budgets |
budgets | any | the rank importance at these budgets |
objective | text | the problem's objective (as prioritize.optimize's) |
budget | number | the objective's budget |
gap | number | the solves' optimality gap (default 0.1) |
extinction_z | any | the features' extinction risk by the species-area relationship with this z (one or per feature) |
prioritize.h3_units
H3 hexagons as planning units, as landschaft's h3_units: the hexagons of an H3 resolution that cover a cost map (its footprint in longitude and latitude, every hexagon that overlaps it), in the map's coordinate system, those over cells with a cost, each with the sum of the costs of the cells it covers weighted by the exact share of each cell inside it. For prioritize.optimize as polygons (cost_column cost).
| Input | Type | What it is |
costrequired | map | the cost map (with a coordinate system) |
| Output | Type | What it is |
units | vector | the hexagons: h3 (the cell's index) and cost |
table | table | per hexagon (unit 1..): its cost |
| Setting | Type | What it is |
resolutionrequired | integer | H3's resolution, 0 to 15 (7 about 5 km², 8 about 0.7 km², 9 about 0.1 km²) |
prioritize.marxan
Marxan 4: reserves that meet the features' targets at the least cost and boundary, by simulated annealing and iterative improvement, a number of runs; the same runs as the Marxan program. From Marxan's tables (pu: id, cost, status; spec: id, target, prop, spf, targetocc; puvspr: species, pu, amount; bound: id1, id2, boundary), or from maps: every cell with a cost a planning unit, the features' layers its amounts, its shared edges its boundaries.
| Input | Type | What it is |
pu | table | the planning units: id, cost, status (0-3) |
spec | table | the features: id, target, prop, spf, targetocc |
puvspr | table | the amounts: species, pu, amount |
bound | table | the boundaries: id1, id2, boundary |
features | stack | maps instead of tables: the features' amounts |
cost | map | maps: the cost of each cell (no value: no unit) |
status | map | maps: 0 available, 1 in at first, 2 locked in, 3 out |
| Output | Type | What it is |
best | table | the best run's reserve: pu, solution (1 in) |
solutions | table | every run's reserve: pu, then a column per run (1 in) |
frequency | table | how often each unit was selected: pu, frequency (0-1) |
summary | table | per run: its score, cost, units, boundary, penalty, shortfall, features missed, least proportion met and final score |
penalties | table | per feature: its id, target and penalty |
map | map | maps: the best run's reserve (1 in, 0 out) |
frequency_map | map | maps: how often each cell was selected |
| Setting | Type | What it is |
blm | number | the boundary length modifier (default 0) |
prop | any | Marxan's PROP: every feature's target as a share of its total; maps: a list, a share per feature |
targets | any | maps: the features' targets (amounts) |
spf | any | maps: the features' penalty factors (default Marxan's) |
edge_factor | number | maps: the weight of the edges to no unit (default 1) |
num_reps | integer | runs (default 10) |
num_iters | integer | annealing's iterations (default 1000000) |
start_temp | number | the starting temperature (-1: adaptive, default) |
cool_fac | number | the cooling factor (default 0) |
num_temp | integer | temperature decreases (default 10000) |
run_mode | integer | Marxan's run mode (default 1) |
heur_type | integer | the heuristic (default 1) |
itimp_type | integer | the iterative improvement (default 0) |
misslevel | number | the share of a target that counts as met (1) |
cost_thresh | number | the cost threshold (default 0: none) |
thresh_pen1 | number | the cost threshold's penalty a |
thresh_pen2 | number | the cost threshold's penalty b |
connectivity_in | bool | boundaries within the reserve count |
seed | integer | the random seed (default 1) |
prioritize.optimize
Systematic conservation planning as an integer linear program (Beyer et al. 2016; Hanson et al. 2025): a decision per planning unit (the cells with a cost), solved to optimality (within the gap) by HiGHS. Objectives: min_set (meet every target at the least cost), min_shortfall, min_largest_shortfall, max_utility, max_features, max_cover, min_penalties, max_phylo_div, max_phylo_end (with a budget); targets relative, absolute, loglinear or by hand; feature weights; binary, proportion or semicontinuous decisions; locked units; boundary, connectivity and linear penalties, linear constraints, neighbour and contiguity constraints; planning units in maps or tables; portfolios of solutions.
| Input | Type | What it is |
features | stack | the features' amounts, a layer each |
cost | map | the cost of each cell (no value: not a planning unit) |
polygons | vector | planning units of polygons (with cost_column; with zones, one per zone): the features' amounts summed over them exactly (exactextract), their shared boundaries and adjacency from the geometries |
zone_costs | stack | management zones: the cost of every cell in every zone, a layer per zone named by it (no value: the cell cannot go to the zone) |
zone_features | stack | zones: every zone's own features, zone after zone; else features and contribution |
contribution_maps | stack | zones: a contribution raster per zone, named by it |
zone_locked_in | stack | zones: the units locked into every zone, a layer each |
zone_locked_out | stack | zones: the units locked out of every zone |
zone_penalty_data | stack | zones: linear penalties, a layer per zone |
zone_constraint_data | stack | zones: a linear constraint, a layer per zone |
pu | table | tables instead of maps: the planning units, a row each (a cost column, the features' columns) |
spec | table | Marxan-style: the features (id) |
rij | table | Marxan-style: the amounts (pu, species, amount) |
boundary_data | table | a boundary matrix of every unit: i, j, x (1-based) |
connectivity_data | table | a symmetric connectivity matrix: i, j, x |
asym_connectivity_data | table | a connectivity matrix: i, j, x |
adjacency_data | table | an adjacency matrix of every unit: i, j, x |
locked_in | map | the units that must be selected (not 0) |
locked_out | map | the units that may not be selected (not 0) |
targets | table | targets by hand: feature (1..), relative (1) or absolute (0), sense (1 >=, -1 <=, 0 =), target |
bounds | table | manual bounds: pu (the cell or row, 1..), lower and upper (a unit listed again: its last bounds) |
status | table | manual locked units: pu and status (1 in, 0 out; a share with proportion decisions), after bounds |
penalty_data | map | linear penalties: a value per cell |
constraint_data | map | the linear constraint: a value per cell |
| Output | Type | What it is |
solution | map | maps: the share of each unit selected (1 selected); zones: the zone of each unit (1.., 0 none) |
allocation | stack | maps with zones: the share of each zone, a layer each |
selection | table | per unit: its cell or row (1..) and the share selected (a portfolio: solution_1.., frequency) |
summary | table | the solution's objective, cost, units selected, the solver's gap and status (1 optimal); a row per solution of a portfolio |
solutions | stack | maps, a portfolio: every solution, a layer each |
frequency | map | maps, a portfolio: the share of the solutions selecting a unit |
coverage | table | per target: its feature, the amount held, the target, the feature's total, and whether it is met (of the first solution) |
extinction_risk | table | min_extinction_risk: per feature its share held, z and species-area risk; their sum last |
| Setting | Type | What it is |
objective | text | min_set (default), min_shortfall, min_largest_shortfall, max_utility, max_features, max_cover, min_penalties, max_phylo_div, max_phylo_end, min_extinction_risk (landschaft's: the least sum of the features' species-area risk 1 - (held / total)^z within the budget) |
z | any | min_extinction_risk: the species-area exponent, one or one per feature, in (0, 1] (0.25) |
segments | integer | min_extinction_risk: the pieces of the linear risk curve (16; exact at their ends) |
budget | any | the objectives with a budget: the cost they may spend (with zones: one, or one per zone) |
manual_targets | any | [{feature, zone (a name or names; default every zone), type: relative|absolute, sense, target}, ...] |
contribution | any | zones: every zone's share of the features ({zone: a number, one per feature, or tables: a column}) |
feature_names | any | zones: the features' names |
zones | any | tables with zones: the zones' names, or Marxan's [{id, name}, ...] |
boundary_zones | any | zones: how much a boundary counts between two zones (zones x zones; default the identity); likewise connectivity_zones, asym_connectivity_zones, neighbors_zones (0/1) and contiguity_zones (0/1), or zones in a spatial item |
connectivity_zones | any | zones: as boundary_zones |
asym_connectivity_zones | any | zones: as boundary_zones (not symmetric) |
neighbors_zones | any | zones: the zones whose units count as neighbours |
contiguity_zones | any | zones: the zones whose units form one patch together |
mandatory_allocation | bool | zones: every planning unit goes to a zone (add_mandatory_allocation_constraints) |
tree | text | max_phylo_div, max_phylo_end: the phylogeny in Newick, its tips the features (with branch lengths) |
relative_targets | any | a share of each feature's total (or one for all) |
absolute_targets | any | an amount per feature |
loglinear_targets | any | [lower amount, lower target, upper amount, upper target(, cap amount, cap target)] |
feature_weights | any | a weight per feature |
decisions | text | binary (default), proportion or semicontinuous |
upper_limit | number | semicontinuous: the most of a unit selected |
boundary_penalty | number | boundary penalties: the weight of the selection's boundary (its exposed edges times edge_factor) |
edge_factor | number | boundary penalties: the weight of edges to no unit (0.5) |
linear_penalty | number | linear penalties: the weight of penalty_data |
linear_threshold | number | a linear constraint on constraint_data |
linear_sense | text | the linear constraint's sense: <= (default), >=, = |
neighbors | number | every selected unit has this many selected neighbours |
clamp | bool | neighbors: fewer for the units with fewer (default true) |
contiguity | bool | the selected units form one patch (adjacent: the raster's 4 neighbours, or adjacency_data) |
feature_contiguity | bool | every feature's units form one patch |
cost_column | text | tables: pu's cost column (default cost) |
features | any | tables: pu's feature columns |
locked_in_column | text | tables: pu's column of the units locked in |
locked_out_column | text | tables: pu's column of the units locked out |
connectivity_penalty | number | connectivity penalties' weight |
asym_connectivity_penalty | number | asymmetric connectivity's weight |
penalty_column | text | tables: pu's column of the linear penalties |
constraint_column | text | tables: pu's column of the linear constraint |
spatial | any | penalties and constraints in order: [{kind: boundary|connectivity|asym_connectivity|linear_penalty|linear_constraint|neighbors|contiguity|feature_contiguity, penalty, edge_factor, threshold, sense, column, k, clamp}, ...] |
portfolio | text | several solutions: cuts (the best distinct ones), top (the best, each to optimality), gap (within pool_gap of the optimum), shuffle (the columns in random orders) |
number_solutions | number | a portfolio's solutions (default 10) |
pool_gap | number | the gap portfolio: how far from the optimum (0.1) |
seed | number | the shuffle portfolio's random orders (default 0) |
remove_duplicates | bool | the shuffle portfolio: distinct solutions (true) |
gap | number | the relative optimality gap (default 0.1) |
time_limit | number | seconds (default none) |
solver | text | highs (default) or gurobi: Gurobi when it is installed and licensed, else HiGHS with a warning |
threads | number | gurobi: the threads it uses (default and most: Terraflux's threads, never every core) |
prioritize.protected_cells
The selected cells of a solution on raster planning units (landschaft's protected_cells): 1 where more than half selected, 0 elsewhere (missing too), for the restrictions of a land change simulation.
| Input | Type | What it is |
solutionrequired | map | a solution (prioritize.optimize's) |
| Output | Type | What it is |
map | map | 1 protected, 0 not |
prioritize.proximity_matrix
1 for every two planning units within a distance of each other (landschaft's proximity_matrix): cell centres, or polygons by their nearest points.
| Input | Type | What it is |
unitsrequired | any | the planning units: a map or a stack (cells), or polygons |
| Output | Type | What it is |
table | table | i, j, x: the units (1..) and their value |
| Setting | Type | What it is |
distancerequired | number | the distance, in the units' coordinates |
prioritize.proxirr
ProxIRR irreplaceability (Baisero et al. 2022), the bits of R's proxirr: for every feature in a unit alpha = min(1, local / (global - target)), and per unit beta = 1 - prod(1 - alpha) (the chance it is needed for some target) and gamma (the targets it is needed for). From Marxan's tables (pu: id; spec: id, prop or target; puvspr: species, pu, amount), or from maps: every cell a unit, the features' layers its amounts.
| Input | Type | What it is |
pu | table | the planning units: id |
spec | table | the features: id, prop (a share of the total) or target |
puvspr | table | the amounts: species, pu, amount |
features | stack | maps instead of tables: the features' amounts |
| Output | Type | What it is |
units | table | per unit: pu, beta, gamma |
alpha | table | per feature in a unit: species, pu, amount, the feature's global amount and target, alpha |
targets | table | per feature: its id, global amount and target |
beta | map | maps: each cell's beta |
gamma | map | maps: each cell's gamma |
| Setting | Type | What it is |
prop | any | maps: the targets as a share of each feature's total |
targets | any | maps: the features' targets (amounts) |
triage | bool | targets above the global amount count 0 (default false) |
prioritize.refine
A selection on coarse blocks (of a prioritize.coarsen-ed problem) back on the fine grid (landschaft's refine): every cell its block's value, none where the fine map has none.
| Input | Type | What it is |
selectionrequired | map | the coarse selection |
likerequired | map | the fine cost map |
| Output | Type | What it is |
map | map | the selection on the fine grid |
prioritize.unit_points
A point per planning unit (landschaft's unit_points): the centre of every cell of a map, or a point inside every polygon (GEOS's point on surface); to measure distances between units with cost.distance or cost.commute_distance.
| Input | Type | What it is |
unitsrequired | any | the planning units: a map or a stack (cells), or polygons |
| Output | Type | What it is |
points | vector | a point per unit, with its number |
prioritize.zonation
Zonation 5's priority ranking (Moilanen et al.), the same rank map as the z5 binary: cells removed one after another by the least marginal loss of the features (rules CAZ1, CAZ2, CAZMAX, ABF, CAZP, CAZPW; RAND, or LOAD a ranking given), with weights, costs, a hierarchic mask and an analysis area. The rank goes from 0 (removed first) to 1 (kept last); the curves tell how much of each feature remains as cells are removed.
| Input | Type | What it is |
featuresrequired | stack | the features' distributions, a layer each |
cost | map | the cost of each cell (no value: 0) |
hierarchic_mask | map | levels 0-255: higher levels are removed last |
analysis_area | map | the cells ranked (not 0, or the area given) |
solution | map | the ranking LOAD evaluates |
condition_maps | stack | the condition of the features' habitat (0-1), a layer each, named in condition |
retention_maps | stack | the maps of retention, named in retention |
resources | stack | the interactions' resources, named in interaction |
areas | map | area numbers (0: none), for the statistics of areas |
compare | map | another solution, for the comparison |
impact_maps | stack | the impact scenarios' maps (sources, subareas, losses, pressures), named in them |
| Output | Type | What it is |
rank | map | the priority rank of each cell, 0-1 |
curves | table | the performance curves: the rank, the cost removed and the share of each feature remaining |
features | table | per feature ranked: its layer (1..), weight, sum, cells with values, cells without data and quantization error (%) |
auc | number | the area under the curve of the mean remaining share |
iterations | number | the iterations of the ranking |
preprocessing | stack | with preprocessing: richness and range-size rarity of the features of positive, negative and zero weight and of every group (weighted too with weights) |
transformed | stack | with transformed: the features as ranked |
area_statistics | table | per set of features (weight class 1, -1, 0, or group) and area: size, mean rank, the features' sum (ds) and weighted (wds), relative to the average (rfd, wfd), cost |
coverage | table | per set and area: the share of every feature in it |
area_mask | map | the areas of a range of ranks (1) or its separate areas |
comparison | table | the cells chosen in both solutions, only in this, only in the other, in neither |
comparison_map | map | 1 both, 2 only this, 3 only the other, 4 neither (0 no data) |
histogram | table | per set of features and bin of coverage: the count of features |
impact_zones | table | per subarea (0 all), impact group, source, zone (0 the footprint), feature and bin (-1 all): the feature's distribution in the zone, its loss and cells |
impact_cumulative | table | per subarea, impact group, phase (1 direct habitat loss, 2 cumulative pressures) and feature: its distribution, loss and cells |
impact_maps | stack | the impact of every group (ig_zones...) |
flexibility | stack | how far each cell could move up, down and both in the order (shares of the cells) |
| Setting | Type | What it is |
rule | text | CAZ2 (default), CAZ1, CAZMAX, ABF, CAZP, CAZPW, RAND, LOAD |
rule_param | number | ABF's z (0.25), CAZP's and CAZPW's p (1) |
weights | any | a weight per feature (default 1) |
abf_z | any | ABF's z per feature (null: rule_param) |
weight_groups | any | a group per feature (-1 none) |
group_weights | any | {group: weight} shared by a group's features |
thresholds | any | per feature: values below become 0 |
extract | any | per feature: the value its layer is 1 at (null: none) |
nodata | any | per feature: its file's NoData value (null: none), which value extraction tells from no value |
zero_mode | text | all (default), none or dynamic: the zeros are data |
keep_zeros | any | dynamic: per feature, whether its zeros are data |
cost_in_ranking | bool | the cost weighs the removal (default true) |
area | integer | the analysis area's value ranked (default 0: every one) |
bits | integer | 8 (default) or 16: the precision of the data |
max_iterations | integer | default 500 |
ranking_error | number | the error to stop at, % (default 0.01) |
stop_on_plateau | bool | stop when the error no longer falls |
smoothing_factor | number | default 0 |
curves_interval | number | the curves' step, a share of the cells |
seed | integer | RAND's seed (default 0) |
condition | any | per feature: the layer of condition_maps its values are multiplied by (null: none; Zonation's -c) |
renormalize | any | per feature (or all): a conditioned feature back to level 1 |
retention | any | per feature (-r): null, the fraction retained everywhere, a layer of retention_maps (fractions per cell) or {absolute: layer} (amounts per cell) |
connectivity | any | per feature (-d): null or a kernel {shape: uniform, triangular, negexp or gaussian, distance (cells), cut}: the feature smoothed by it |
self_multiply | any | per feature (or all): the smoothed feature times itself |
interaction | any | per feature (-i): null or {kernel, resource (a layer of resources), positive, beta, normalize} |
interaction2 | any | per feature (-I): interactions after the matrices |
matrix_connectivity | any | per feature (-m): null or {kernel, matrix}: the features of a matrix smoothed and mixed by it |
matrices | any | {matrix: rows} (a row per source feature, a column per target, in the features' order) |
groups | any | an output group per feature (-1 none) |
preprocessing | bool | Zonation's pre-processing maps (-b) |
impact_groups | any | an impact group per feature (-1 none) |
impact_bins | any | per feature: null, 0 (ten bins) or the limits of the value classes its impacts are reported in |
impact | any | an impact scenario (-s): {sources (a layer of impact_maps), impacts: [{group, source, footprint (%), buffers: [[radius, %]...]}], subareas} |
cumulative_impact | any | a cumulative scenario (-e): {direct (sum, product), direct_rasters, direct_matrix, cumulative (variant1, variant2), pressures: [{raster, normalize, offset, divisor}], cumulative_matrix, aggregation (add, multiply, max), functions: [{group, pressure, points}], subareas} |
area_statistics | any | statistics of areas: "areas" (the map areas, the default with it), [min_rank, max_rank] or [min_rank, max_rank, min_size] (its separate 8-connected areas) |
comparison | any | [min_rank, max_rank, min_value, max_value]: the cells ranked so against those of compare valued so |
histogram | any | [min_rank, max_rank, bins]: the features' coverage |
flexibility | number | the flexibility map's max error (%): how far each cell could move before its loss differs by it |
transformed | any | per feature (or all): the feature as ranked (-f) |
block_rows | integer | Zonation adds the features up by blocks of rows: those of the files read (default: one block) |
prioritize.zonation_project
A Zonation 5 project run as the z5 binary runs it (landschaft's run_project): the settings file (.z5), its feature list and link files (conditions, retention, connectivity, weight groups, impact scenarios, binning) read with the switches of the z5 command line, the rasters they name read from disk; the ranking of prioritize.zonation, and with -p the calls of the post-processing file one after another.
| Output | Type | What it is |
rank | map | the priority rank of each cell, 0-1 |
curves | table | the performance curves: the rank, the cost removed and the share of each feature remaining |
features | table | per feature ranked: its layer (1..), weight, sum, cells with values, cells without data and quantization error (%) |
auc | number | the area under the curve of the mean remaining share |
iterations | number | the iterations of the ranking |
preprocessing | stack | with preprocessing: richness and range-size rarity of the features of positive, negative and zero weight and of every group (weighted too with weights) |
transformed | stack | with transformed: the features as ranked |
impact_zones | table | per subarea (0 all), impact group, source, zone (0 the footprint), feature and bin (-1 all): the feature's distribution in the zone, its loss and cells |
impact_cumulative | table | per subarea, impact group, phase (1 direct habitat loss, 2 cumulative pressures) and feature: its distribution, loss and cells |
impact_maps | stack | the impact of every group (ig_zones...) |
area_statistics | table | -p: the statistics of areas of every call (area_statistics_external, _rank_range, _separate_areas), the call's number first |
coverage | table | -p: per call, set and area: the share of every feature in it |
comparison | table | -p: per solution_comparison call: the cells in both... |
histogram | table | -p: per histogram call, set and bin: the count of features |
post_maps | stack | -p: the calls' maps named as Zonation's files (area_statistics_rank_range.mask., solution_comparison.mask., flexibilitymap..up...) |
| Setting | Type | What it is |
pathrequired | text | the project's settings file (.z5) |
flags | text | the z5 switches: -w weights, -W weight groups, -g output groups, -t thresholds, -c conditions, -r retention, -x/-X cost (tracked / in the ranking), -h hierarchic mask, -a analysis area (--area=N), -b pre-processing maps, -f the features as ranked, -d/-i/-I/-m connectivity, -s/-e impact scenarios, -p post-processing (e.g. "-wg -X") |
mode | text | the marginal loss rule, z5's --mode (CAZ2 by default; "ABF 0.25"...); a --mode= in flags too |
bits | integer | 8 (z5, the default) or 16 (z5_16bit) |