iLand
|
management routines. More...
#include <management.h>
Public Slots | |
QJSValue | tree (int index) |
access to single trees (returns a reference) More... | |
QJSValue | treeObject (int index) |
return a copy of a tree More... | |
double | mean (QString expression, QString filter=QString()) |
calculate the mean value for all trees in the internal list for 'expression' (filtered by the filter criterion) More... | |
double | sum (QString expression, QString filter=QString()) |
calculate the sum for all trees in the internal list for the 'expression' (filtered by the filter criterion) More... | |
int | remain (int number) |
remove randomly trees until only 'number' of trees remain. More... | |
int | killPct (int pctfrom, int pctto, int number) |
kill "number" of stems in the percentile interval "from" - "to". More... | |
int | killAll () |
kill all trees in the list More... | |
int | disturbanceKill (double stem_to_soil_fraction, double stem_to_snag_fraction, double branch_to_soil_fraction, double branch_to_snag_fraction, QString agent) |
kill all trees (disturbance related) More... | |
int | kill (QString filter, double fraction) |
kill 'fraction' of all trees with 'filter'=true More... | |
int | managePct (int pctfrom, int pctto, int number) |
kill "number" of stems in the percentile interval "from" - "to". More... | |
int | manageAll () |
manage all trees in the list More... | |
int | manage (QString filter, double fraction) |
manage 'fraction' of all trees with 'filter'=true More... | |
void | cutAndDrop () |
kill trees, cut down to the ground More... | |
double | percentile (int pct) |
get value for the pct th percentile (1..100) More... | |
int | loadAll () |
load all trees, return number of trees More... | |
int | load (QString filter) |
load all trees passing the filter in a list, return number of trees More... | |
int | loadResourceUnit (int ruindex) |
load all trees of a resource index More... | |
void | loadFromTreeList (QList< Tree * >tree_list) |
load a previously present tree list More... | |
void | loadFromMap (const MapGrid *map_grid, int key) |
load all trees that are on the area denoted by 'key' of the given grid More... | |
int | loadFromMap (MapGridWrapper *wrap, int key) |
load all trees that are on the area denoted by 'key' of the given grid (script access) More... | |
void | killSaplings (MapGridWrapper *wrap, int key, QString filter=QString()) |
kill all saplings that are on the area denoted by 'key' of the given grid (script access) More... | |
void | killSaplingsResourceUnit (int ruindex) |
kill all saplings that are on a given resource unit (given by 'ruindex') More... | |
void | removeSoilCarbon (MapGridWrapper *wrap, int key, double SWDfrac, double DWDfrac, double litterFrac, double soilFrac) |
hacky access function to resource units covered by a polygon. More... | |
void | slashSnags (MapGridWrapper *wrap, int key, double slash_fraction) |
slash snags (SWD and otherWood-Pools) of polygon 'key' on the map 'wrap'. More... | |
void | sort (QString statement) |
sort trees in the list according to a criterion More... | |
int | filter (QString filter) |
apply a filter on the list of trees (expression), return number of remaining trees. More... | |
int | filterIdList (QVariantList idList) |
apply filter in form of a list of ids, return number of remaining trees More... | |
void | randomize () |
random shuffle of all trees in the list More... | |
Public Member Functions | |
Management () | |
~Management () | |
void | run () |
void | loadScript (const QString &fileName) |
QString | scriptFile () const |
double | removeFoliage () const |
removal fraction foliage: 0: 0% will be removed, 1: 100% will be removed from the forest by management operations (i.e. calls to manage() instead of kill()) More... | |
double | removeBranch () const |
removal fraction branch biomass: 0: 0% will be removed, 1: 100% will be removed from the forest by management operations (i.e. calls to manage() instead of kill()) More... | |
double | removeStem () const |
removal fraction stem biomass: 0: 0% will be removed, 1: 100% will be removed from the forest by management operations (i.e. calls to manage() instead of kill()) More... | |
void | setRemoveFoliage (const double fraction) |
void | setRemoveBranch (const double fraction) |
void | setRemoveStem (const double fraction) |
int | count () const |
return number of trees currently in list More... | |
Properties | |
int | count |
double | removeFoliage |
double | removeBranch |
double | removeStem |
management routines.
The actual iLand management is based on Javascript functions. This class provides the frame for executing the javascript as well as the functions that are called by scripts and that really do the work. See http://iland-model.org/iLand+scripting, http://iland-model.org/Object+Management for management Javascript API.
Management::Management | ( | ) |
Management::~Management | ( | ) |
|
inline |
return number of trees currently in list
|
slot |
kill trees, cut down to the ground
|
slot |
kill all trees (disturbance related)
stem_to_soil_fraction | (0..1) of stem biomass that is routed to the soil |
stem_to_snag_fraction | (0..1) of the stem biomass continues as standing dead |
branch_to_soil_fraction | (0..1) of branch biomass that is routed to the soil |
branch_to_snag_fraction | (0..1) of the branch biomass continues as standing dead |
foliage_to_soil_fraciton | (0..1) fraction of biomass that goes directly to the soil. The rest (1.-fraction) is removed. |
agent | (string): disturbance agent ('fire' 'wind', 'bb', ...) |
|
slot |
apply a filter on the list of trees (expression), return number of remaining trees.
|
slot |
apply filter in form of a list of ids, return number of remaining trees
|
slot |
kill 'fraction' of all trees with 'filter'=true
|
slot |
kill all trees in the list
|
slot |
kill "number" of stems in the percentile interval "from" - "to".
remove all if "number" is higher than the count. return the number of removed trees.
|
slot |
kill all saplings that are on the area denoted by 'key' of the given grid (script access)
|
slot |
kill all saplings that are on a given resource unit (given by 'ruindex')
|
slot |
load all trees passing the filter in a list, return number of trees
|
inlineslot |
load all trees, return number of trees
|
slot |
load all trees that are on the area denoted by 'key' of the given grid
loadFromMap selects trees located on pixels with value 'key' within the grid 'map_grid'.
|
slot |
load all trees that are on the area denoted by 'key' of the given grid (script access)
|
slot |
load a previously present tree list
|
slot |
load all trees of a resource index
void Management::loadScript | ( | const QString & | fileName | ) |
|
slot |
manage 'fraction' of all trees with 'filter'=true
|
slot |
manage all trees in the list
|
slot |
kill "number" of stems in the percentile interval "from" - "to".
remove all if "number" is higher than the count. Use the removal fractions set by the removeStem, removeBranch and removeFoliage properties. return the number of removed trees.
|
inlineslot |
calculate the mean value for all trees in the internal list for 'expression' (filtered by the filter criterion)
|
slot |
get value for the pct th percentile (1..100)
|
slot |
random shuffle of all trees in the list
|
slot |
remove randomly trees until only 'number' of trees remain.
return number of removed trees
|
inline |
|
inline |
|
slot |
hacky access function to resource units covered by a polygon.
specify removal fractions
the parameters are "remove-fractions": i.e. value=0: no change, value=1: set to zero.
SWDFrac | 0: no change, 1: remove all of standing woody debris |
DWDfrac | 0: no change, 1: remove all of downed woody debris |
litterFrac | 0: no change, 1: remove all of soil litter |
soilFrac | 0: no change, 1: remove all of soil organic matter |
|
inline |
void Management::run | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
slot |
slash snags (SWD and otherWood-Pools) of polygon 'key' on the map 'wrap'.
slash snags (SWD and otherWood-Pools) of polygon key
on the map wrap
.
slash_fraction | 0: no change, 1: 100% |
The factor is scaled to the overlapping area of key
on the resource unit.
wrap | MapGrid to use together with key |
key | ID of the polygon. |
slash_fraction | 0: no change, 1: 100% |
|
slot |
sort trees in the list according to a criterion
|
inlineslot |
calculate the sum for all trees in the internal list for the 'expression' (filtered by the filter criterion)
|
slot |
access to single trees (returns a reference)
|
slot |
return a copy of a tree
|
read |
|
readwrite |
|
readwrite |
|
readwrite |