download_landcover: Download Landcover

download_landcoverR Documentation

Download Landcover

Description

Download the Land Cover 100 m from the Copernicus Global Land Service and copy it to its corresponding folder.

Usage

download_landcover(
  mainPath,
  location,
  alwaysDownload = FALSE,
  mostRecent = FALSE
)

Arguments

mainPath

character; the parent directory of the location folder

location

character; the location folder name

alwaysDownload

logical; should the raster always be downloaded, even if it has already been downloaded? If FALSE and if the raster has already been downloaded the user is interactively asked whether they want to download it again or not.

mostRecent

logical; should the most recent boundary shapefile be selected to define the required landcover tiles? If FALSE and if there are multiple available inputs, the user is interactively asked to select the input based on file creation time.

Details

The function downloads the landcover tiles from the AWS cloud and determines the file names based on the extent of the boundary shapefile. If there are multiple tiles, it produces a mosaic.

Examples

# Replace workDir with the actual path to your working directory
## Not run: 
mainPath <- "workDir"
initiate_project(mainPath)
## End(Not run)

# Replace myLocation with the location name you are working on (workDir subfolder)
## Not run: 
location <- "myLocation"
download_boundaries(mainPath, location, adminLevel = 1, type = "gbOpen", alwaysDownload = TRUE)
download_landcover(mainPath, location, alwaysDownload = TRUE, mostRecent = TRUE)
## End(Not run)

ptimoner/inAccMod documentation built on Jan. 27, 2025, 9:34 a.m.