This function is called by the cov_landuse module and downloads data on the percentage of land used for each category selected. Data is obtained at a 100 m resolution from the Copernicus Global Land Service e.g. https://zenodo.org/records/3939038 as documented here: https://zenodo.org/records/4723921

cov_landuse(shape, year, landuses, async = FALSE)

Arguments

shape

sf. sf object containing the area of interest

year

numeric. The requested year (2015-2019 only)

landuses

vector. List of the requested land use types from the following options: Bare, BuiltUp, Crops, Grass, MossLichen, PermanentWater, SeasonalWater, Shrub, Snow, Tree

async

logical. Whether or not the function is being used asynchronously

Value

a list of containing an item for each land use, either SpatRaster objects when async is FALSE or PackedSpatRaster objects when async is TRUE

Author

Simon Smart simon.smart@cantab.net

Examples

x_min <- 0
x_max <- 0.5
y_min <- 52
y_max <- 52.5
poly_matrix <- matrix(c(x_min, x_min, x_max, x_max, x_min,
                        y_min, y_max, y_max, y_min, y_min), ncol = 2)
poly <- sf::st_polygon(list(poly_matrix))
shape <- sf::st_sf(1, geometry = list(poly))
sf::st_crs(shape) = 4326
raster <- cov_landuse(shape = shape,
                      year = 2019,
                      landuses = "Crops")
#> although coordinates are longitude/latitude, st_intersects assumes that they
#> are planar