download_tiles: Download a set of GFC tiles

View source: R/download_tiles.R

download_tilesR Documentation

Download a set of GFC tiles

Description

This function first checks whether each tile in a set GFC product tiles is present locally, and that local file sizes match the file sizes of the files available on the Google server hosting the GFC product. Next, the function downloads all tiles that either are not present locally, or that are present but have file sizes differing from the file on the Google server.

Usage

download_tiles(
  tiles,
  output_folder,
  images = c("treecover2000", "lossyear", "gain", "datamask"),
  dataset = "GFC-2022-v1.10"
)

Arguments

tiles

sf with GFC product tiles to download, as calculated by the calc_gfc_tiles function.

output_folder

the folder to save output data in

images

which images to download. Can be any of 'treecover2000', 'loss', 'gain', 'lossyear', 'datamask', 'first', and 'last'.

dataset

which version of the Hansen data to use

See Also

extract_gfc

Examples

## Not run: 
output_folder <- 'H:/Data/TEAM/GFC_Product'
tiles <- calc_gfc_tiles(test_poly)
download_tiles(tiles, output_folder)

## End(Not run)

gfcanalysis documentation built on Oct. 11, 2023, 5:15 p.m.