Skip to contents

Download a SpatRaster from the Global Land Cover from the Copernicus Global Land Service.

Usage

fd_landcover_copernicus(
  x,
  lon = NULL,
  lat = NULL,
  year = 2019,
  layer = "forest",
  crop = FALSE,
  ...,
  quiet = FALSE
)

Arguments

x

an sf or SpatVector object. It will retrieve the necessary tiles to cover the area (if lat and lon are specified, this argument is ignored)

lon

a number specifying the longitude of the area where we want the tile

lat

a number specifying the latitude of the area where we want the tile

year

year of the land cover data. One of 2015:2019 or 'all'

layer

a character vector of the layer(s) to use from the Global Land Cover. See details

crop

when x is specified, whether to crop the tile(s) to the object

...

additional arguments passed to the crop function

quiet

if TRUE, suppress any message or progress bar

Value

SpatRaster object

Details

There are 14 different layers that can be downloaded:

  • "discrete": land cover discrete classification

  • "classification": land cover classification probability

  • "bare": cover fraction of bare and sparse vegetation

  • "builtup": cover fraction of builtup

  • "crops": cover fraction of cropland

  • "tree": cover fraction of forest

  • "grass": cover fraction of herbaceous vegetation

  • "mosslichen": cover fraction of moss and lichen

  • "seasonalwater": cover fraction of seasonal inland water

  • "shrub": cover fraction of shrubland

  • "snow": cover fraction of snow and ice

  • "permanentwater": cover fraction of permanent inland water

  • "forest" (default): forest types. (0): unknown; (1): evergreen needle leaf forest; (2): evergreen broad leaf forest; (3): deciduous needle leaf; (4): deciduous broad leaf; (5): mix of forest types

  • "datadensityindicator": input data density

References

Buchhorn, M.; Smets, B.; Bertels, L.; De Roo, B.; Lesiv, M.; Tsendbazar, N. - E.; Herold, M.; Fritz, S. Copernicus Global Land Service: Land Cover 100m: collection 3: epoch 2019: Globe 2020. DOI 10.5281/zenodo.3939050

Examples

# \donttest{
 # Get tile for Galicia (Spain) and year 2019
 galicia_forest_extent <- fd_landcover_copernicus(
  lat  = 42.7,
  lon  = -7.8,
  year = 2019
 )
#>  1 tile(s) were found. 1 tile(s) per year.
 # Get forest and discrete classification tiles for all years
 galicia_forest_extent <- fd_landcover_copernicus(
  lat  = 42.7,
  lon  = -7.8,
  year = "all",
  layer = c("forest", "discrete")
 )
#>  10 tile(s) were found. 2 tile(s) per year.
#> ⠙ 1/10 ETA: 19s | Dowloaded years 
#> ⠹ 2/10 ETA: 17s | Dowloaded years 
#> ⠸ 3/10 ETA: 15s | Dowloaded years 
#> ⠼ 5/10 ETA: 11s | Dowloaded years 
#> ⠴ 6/10 ETA:  8s | Dowloaded years 
#> ⠦ 8/10 ETA:  4s | Dowloaded years 
#>  Download completed [18.9s]
#> 
 # }