download_WCF_tiles: Download Woody Cover Tiles

View source: R/download_WCF_tiles.R

download_WCF_tilesR Documentation

Download Woody Cover Tiles

Description

Downloads the woody cover tiles and saves them in the same directory structure as on the NCI THREDDS

Usage

download_WCF_tiles(spobj, years, rootdir = ".", ...)

Arguments

spobj

Spatial* or sf object that informs extents of the raster to extract

years

Years of data to download

rootdir

Root directory to copy tile structure to

...

Passed to download.file(). I've found more reliability using mode = "wb" on windows.

Value

A list giving success or otherwise of file downloads. Code 0 for success - see download.file() return value.

Examples

polypts <- matrix(data = c(1590555, -3670100,
                           1610200, -3670100,
                           1610200, -3664500,
                           1590555, -3664500,
                           1590555, -3670100), byrow = TRUE, ncol = 2)
spobj <- sf::st_sfc(sf::st_polygon(x = list(polypts), dim = "XY"), crs = 3577)
download_WCF_tiles(spobj, years = 2000:2001)

sustainablefarms/sflddata documentation built on April 19, 2022, 11:19 a.m.