downloader: Downloads files from CLMS server

View source: R/downloader.R

downloaderR Documentation

Downloads files from CLMS server

Description

This function deals with the authenification and download the files. (currently a bit hardcoded, will be improved soon)

Usage

downloader(x, rootDir = "./", user, password)

Arguments

x

list. The return of selector containint the files to be donwloaded.

rootDir

character. Default is current directory. Base location for the local archive. Inside rootDir the function then creates a file structure similar to the one on the server: e.g. (currently hard coded): CLMS/Pan-European/HRL/Snow/FSC/2020/08/18/FSC_20200818T114635_S2B_T29UNV_V100_1.zip

user

character. Your username on https://cryo.land.copernicus.eu/finder/

password

character. Your password on https://cryo.land.copernicus.eu/finder/

Value

vector with path/filename to the locally stored zip archives.

Author(s)

Matteo Mattiuzzi

Examples

## Not run: 
x <- composeUrl(productType = 'FSC', productIdentifier = 'T29UNV',
startDate='2020-07-01', completionDate='2020-07-31')
if(require(rjson)){
x <- fromJSON(file = x)
x <- selector(x)
downloader(x, user='yourUser', password='yourPassword',rootDir=tempdir())
}

## End(Not run)


MatMatt/clmsapi documentation built on Feb. 4, 2023, 9:08 a.m.