Retrieve the existing (i.e. aggregated) habitat data.
Source:R/restopt_problem.R
get_existing_habitat.Rd
Retrieve the existing (i.e. aggregated) habitat data.
Arguments
- problem
restopt_problem()
Restoration problem object.
Value
terra::rast()
The existing (aggregated) habitat data.
Examples
# \donttest{
#' # load data
habitat_data <- rast(
system.file("extdata", "habitat_hi_res.tif", package = "restoptr")
)
# create problem
problem <- restopt_problem(
existing_habitat = habitat_data,
aggregation_factor = 4,
habitat_threshold = 0.7
)
plot(get_existing_habitat(problem))
# }