download_copernicus: Download COPERNICUS products

Description Usage Arguments Details Value Author(s) Examples

Description

Download COPERNICUS products, for a given period of time and tile(s)

Usage

1
2
download_copernicus(product,begin,end,extent,tileH,tileV,
                    outPath,user,password,ntry,allowParallel = FALSE,...)

Arguments

product

One of the following: 'NDVI_1km_V1' (Normalized Difference Vegetation Index - VGT instrument),'NDVI_1km_V2' (Normalized Difference Vegetation Index - PROBAV instrument),'LAI' (Leaf Area Index),'FCOVER' (Fraction of Vegetation Green Cover), 'FAPAR' (Fraction of Absorbed Photosynthetically Active Radiation),'VCI' (Vegetation Condition Index),'VPI' (Vegetation Productivity Index), 'DMP' (Dry Matter Productivity),'BA' (Burnt Areas)

begin

begin of the time period. Date object, numeric or character of length 1 that can be transformed to a Date using ymd. See ?ymd for more details. ymj format is also accepted (with j being the day of the year)

end

end of the time period. Same format as begin

extent

an object of class Raster*, Extent or SpatialPolygons* giving the extent from which tiles should be downloaded. See get_tile_copernicus for details.

tileH

H index of the tile COPERNICUS system (numeric or character)

tileV

V index of the tile COPERNICUS system (numeric or character)

outPath

Path where downloaded files should be stored. Default set via copernicus_options('downloadPath')

user

User name to access COPERNICUS data portal. Default set via copernicus_options('user')

password

Password associated with user name to access COPERNICUS data portal. Default set via copernicus_options('password')

ntry

Number of tries after non-succes download response from the server. Increasing the value increases chances to actually get the data. Default set via copernicus_options('ntry')

allowParallel

Logical. If a foreach parallel backend is loaded and available, should the function use it? Default is FALSE.

...

argument passed to get_url_copernicus, such as groupByDate

Details

If target files are already present in the outPath directory, they are not downloaded. One should choose to use either an extent or pairs of (H,V) values. If extent is provided, tileH and tileV are not used.

Value

Return invisibly the list of downloaded files

Author(s)

Antoine Stevens

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# Don't forget to provide in copernicus_options() your user and password
# for COPERNICUS data portal before running this
# Let's download NDVI V1 prodct, for JUN 2009, and tile (h=19,v=4)
download_copernicus(product = 'NDVI_1km_V1', begin = '2009-06-01', end = '2009-06-30',
                   tileH = 19, tileV = 4)
# one could also use an extent object, instead of (tileH,tileV) pairs, eg:
library(raster)
e <- extent(c(-1,2,49,51))
# this will download 12 files (4 tiles x 3 time periods)
download_copernicus(product = 'NDVI_1km_V1', begin = '2009-06-01', end = '2009-06-30', extent = e)

## End(Not run)

antoinestevens/copernicus documentation built on May 10, 2019, 12:23 p.m.