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

1
2
download_tiles(tiles, output_folder, images = c("treecover2000", "loss",
  "gain", "lossyear", "datamask"), data_year = 2015)

Arguments

tiles

SpatialPolygonsDataFrame 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'.

data_year

which version of the Hansen data to use

See Also

extract_gfc

Examples

1
2
3
4
5
6
## Not run: 
output_folder <- 'H:/Data/TEAM/GFC_Product'
tiles <- calc_gfc_tiles(test_poly)
download_tiles(tiles, output_folder)

## End(Not run)