S2_download | R Documentation |
Simple helper function to download data (granules, images, QI data)
S2_download(url, destfile, zip = TRUE, skipExisting = "samesize", progressBar = TRUE, timeout = 1800, tries = 1, ...)
url |
character (valid) url to download file from. |
destfile |
character download destination. |
zip |
logical if |
skipExisting |
character should locally existing files be skipped - one of "always", "samesize" (only if remote and local file size matches), "never". |
progressBar |
should a progress bar be displayed? |
timeout |
single file download timeout in seconds (0 means no timeout) |
tries |
how many times try download in case of failures |
... |
further arguments not implemented directly - see the granule API doc and the image API doc. |
logical vector indicating which downloads where successful
## Not run: # find, download and unzip a full granule granules = S2_query_granule( utm = '33UXP', dateMin = '2016-06-01', dateMax = '2016-06-30' ) S2_download(granules$url, granules$date) # find and download a bunch of images images = S2_query_image( utm = '33UXP', dateMin = '2016-06-01', dateMax = '2016-06-30', band = 'B03' ) S2_download(images$url, paste0(images$date, '.', images$format)) # reproject downloaded images by passing additional API parameter S2_download(images$url, paste0(images$date, '.', images$format), srid = 4326) # download particular URL S2_download( 'https://test%40s2%2Eboku%2Eeodc%2Eeu:test@s2.boku.eodc.eu/image/33148479', 'test.jp2' ) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.