Retrieve the aggregated cell area of a restopt problem.
Source:R/restopt_problem.R
get_cell_area.Rd
Retrieve the aggregated cell area of a restopt problem.
Arguments
- problem
restopt_problem()
Restoration problem object.
Value
terra::rast()
The aggregated cell area of the restopt problem.
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
)
get_cell_area(problem)
#> class : SpatRaster
#> dimensions : 467, 679, 1 (nrow, ncol, nlyr)
#> resolution : 111.7948, 118.9736 (x, y)
#> extent : 419768.2, 495676.9, 227509.1, 283069.8 (xmin, xmax, ymin, ymax)
#> coord. ref. : RGNC91-93 / Lambert New Caledonia (EPSG:3163)
#> source(s) : memory
#> name : Cell area (aggregated)
#> min value : 1
#> max value : 16
# }