Creates a set of targets for a landscape
Source:R/flsgen_create_landscape_targets.R
flsgen_create_landscape_targets.Rd
Creates a set of targets for a landscape, which can be converted into JSON for flsgen.
Usage
flsgen_create_landscape_targets(
nb_rows,
nb_cols,
classes,
mask_raster = NULL,
NON_FOCAL_PLAND = NULL
)
Arguments
- nb_rows
Number of rows
- nb_cols
Number of columns
- classes
list of class targets
- mask_raster
mask raster (path or terra::rast object)
- NON_FOCAL_PLAND
PLAND (proportion of landscape) target on the non-focal land-use class
Details
The class targets must be created prior to the call to this function
Either nb_rows and nb_cols, or mask_raster must be specified. The dimensions of the landscape are deduced from the mask raster if it is used.
Examples
if (FALSE) {
cls_1 <- flsgen_create_class_targets("class 1", NP=c(1, 10), AREA=c(0, 1000))
cls_2 <- flsgen_create_class_targets("class 2", NP=c(1, 10), AREA=c(0, 1000))
ls_targets <- flsgen_create_landscape_targets(200, 200, list(cls_1, cls_2))
}