compute_land_cover: Compute land cover statistics

View source: R/compute_copernicus_land_cover.R

compute_land_coverR Documentation

Compute land cover statistics

Description

Compute copernicus global land cover statistics - 23 discrete classifications

Usage

compute_land_cover(rast = NULL, aoi = NULL, year = NULL)

Arguments

rast

land cover raster

aoi

area of interest - polygon object (sf)

year

year

Value

land cover classes

Examples



# load raster
r <- terra::rast(system.file("extdata", "test_lc_rast.tif", package = "openRspat"))
# load polygon
fname <- system.file("shape/nc.shp", package="sf")
sf <- sf::st_read(fname)
# transform sf object to match projection with raster object
sf <- sf::st_transform(sf, "+proj=longlat +datum=WGS84 +no_defs")
# call function
compute_land_cover(rast=r, aoi=sf[1,], year=2015)



Ohm-Np/openRspat documentation built on June 23, 2022, 3:03 p.m.