Use MODIS MCD12Q1 land cover input map (src_raster) and a coarser destination raster (E-OBS, CMIP5) to calculate land cover representation of these coarser cells.

pr_calc_land_cover(
  lc_raster,
  dest_raster,
  lc_classes = c(1, 4, 5, 10),
  path = tempdir(),
  internal = FALSE
)

Arguments

lc_raster

a MCD12Q1 map in epsg:4326.

dest_raster

area to calculate the statistics for, with a coarser resolution than the 500m MCD12Q1 data

lc_classes

land cover classes to calculate the statistics for. only IGBP classes (1 - 16) are supported. Takes a vector e.g. c(1, 4)

path

path to output your generated data to if not outputting it to the R console / workspace, default = "~"

internal

TRUE / FALSE, if true no files are written to disk and a raster stack is returned to the R command line

Details

The algorithm counts the number of occurences in a given pixel of the destination raster. Both maps should be in EPSG:4326.

Examples