View source: R/pr_calc_land_cover.R
pr_calc_land_cover | R Documentation |
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
)
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 |
The algorithm counts the number of occurences in a given pixel of the destination raster. Both maps should be in EPSG:4326.
## Not run:
# will return a land cover density map for
# the evergreen needleleaf class (1) and
# the deciduous broadleaf classs (4)
lc_dens = pr_calc_land_cover(lc_classes = c(1, 4),
lc_raster = "~/MCD12Q1_igbp_map.tif"
dest_raster = "~/1_degree_lat_lon_map.tif")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.