downloadMODIS: Download MODIS Data

Description Usage Arguments Details Author(s) References See Also Examples

View source: R/getMODIS.R

Description

downloadMODIS downloads MODIS Vegetation Index data queried by get_products.

Usage

1
downloadMODIS(gSD_query, out_dir, use_aria = TRUE, do_par = TRUE, cores = NA)

Arguments

gSD_query

records data.frame. A valid query result returned by get_products.

out_dir

out_dir character. Full path to download output directory.

use_aria

optional logical. If True, aria2c is used for bulk downloading the selected images. Requires valid aria2 installation. For help, see https://aria2.github.io/. Default is TRUE

do_par

optional logical. Whether parallel download should be applied. This parameter is ignored when use_aria == TRUE. Default is TRUE

cores

optional integer. Number of cores used for parallel download. If NA, available cores will be detected and used. Ignored when aria2 == TRUE or do_par == FALSE. Default is NA.

Details

Selected MODIS tiles are downloaded as .hdf archives from the Level-1 and Atmosphere Archive & Distribution System (LAADS) of NASA's Distributed Active Archive Center (DAAC) at the Goddard Space Flight Center in Greenbelt, Maryland (https://ladsweb.modaps.eosdis.nasa.gov/)

Author(s)

Sandro Groth

References

Jakob Schwalb-Willmann (2018). getSpatialData: Get different kinds of freely available spatial datasets. R package version 0.0.4. http://www.github.com/16eagle/getSpatialData/

See Also

prepMODIS get_products

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Import packages
## Not run: 
library(getSpatialData)
library(sf)

## Set query parameters
aoi_data <- data("aoi_data")
set_aoi(aoi_data[[1]])
time_range <- c("2017-01-01", "2017-12-31")

## Login to USGS
loginUSGS("Username")
loginEarthData("Username")

## get available products
product_names <- get_products("MODIS")
product <- grep("MOD13Q1", product_names, value = T)

## Execute query
query <- getMODIS_records(time_range = time_range, name = product)

## Download all selected tiles
donwloadMODIS(query, "path/to/directory")

## End(Not run)

SandroGroth/phenoRS documentation built on July 12, 2020, 4:33 a.m.