Skip to contents

Calculates forest loss within a user-defined region for a specified year range. Forest loss is defined as a stand-replacement disturbance, or a change from forest to non-forest state.

[Stable]

Usage

l4h_forest_loss(from, to, region, sf = TRUE, quiet = FALSE, force = FALSE, ...)

Arguments

from

Integer. The start year of the analysis window, ranging from 2001 to one year before the current year (e.g., if today is 2025, the maximum is 2024).

to

Integer. The end year of the analysis window, ranging from from to the current year. Must be >= from (e.g., if from = 2010, valid to values are 2010–2025 for current year 2025).

region

A spatial object defining the region of interest. Accepts an sf, sfc, or SpatVector object (from the terra package).

sf

Logical. Return result as an sf object? Default is TRUE.

quiet

Logical. If TRUE, suppress the progress bar (default FALSE).

force

Logical. Force request extract.

...

arguments of ee_extract of rgee packages.

Value

A sf or tibble object with forest loss per year in square kilometers.

Details

Forest loss is derived from the Hansen Global Forest Change dataset. The lossyear band encodes the year of forest cover loss as follows:

  • Values range from 1 to n, where 1 corresponds to the year 2001 and n to the year 2000 + n.

  • A value of 0 indicates no forest loss detected.

References

Hansen, M. C., Potapov, P. V., Moore, R., Hancher, M., Turubanova, S. A., Tyukavina, A., ... & Townshend, J. R. G. (2013). High-Resolution Global Maps of 21st-Century Forest Cover Change. Science, 342(6160), 850–853. DOI: doi:10.1126/science.1244693

Examples

if (FALSE) { # \dontrun{
library(land4health)
ee_Initialize()

# Define region as a bounding box polygon
region <- st_as_sf(st_sfc(
  st_polygon(list(matrix(c(
    -74.1, -4.4,
    -74.1, -3.7,
    -73.2, -3.7,
    -73.2, -4.4,
    -74.1, -4.4
  ), ncol = 2, byrow = TRUE))),
  crs = 4326
))

# Run forest loss calculation
result <- l4h_forest_loss(from = 2005, to = 2007, region = region)
head(result)
} # }