treecover_area function

Calculate treecover statistics

Calculate treecover statistics

This functions allows to efficiently calculate treecover statistics for polygons. For each year in the analysis timeframe, the forest losses in preceding and the current years are subtracted from the treecover in the year 2000 and actual treecover figures within the polygon are returned.

calc_treecover_area(years = 2000:2023, min_size = 10, min_cover = 35)

Arguments

  • years: A numeric vector with the years for which to calculate treecover area.
  • min_size: The minimum size of a forest patch to be considered as forest in ha.
  • min_cover: The minimum cover percentage per pixel to be considered as forest.

Returns

A function that returns an indicator tibble with variable treecover and corresponding area (in ha) as value.

Details

The required resources for this indicator are:

  • gfw_treecover
  • gfw_lossyear

Examples

## Not run: library(sf) library(mapme.biodiversity) outdir <- file.path(tempdir(), "mapme-data") dir.create(outdir, showWarnings = FALSE) mapme_options( outdir = outdir, verbose = FALSE ) aoi <- system.file("extdata", "sierra_de_neiba_478140_2.gpkg", package = "mapme.biodiversity" ) %>% read_sf() %>% get_resources( get_gfw_treecover(version = "GFC-2023-v1.11"), get_gfw_lossyear(version = "GFC-2023-v1.11") ) %>% calc_indicators(calc_treecover_area(years = 2016:2017, min_size = 1, min_cover = 30)) %>% portfolio_long() aoi ## End(Not run)