getModis: Find and download MODIS products

Description Usage Arguments Details Value References See Also Examples

View source: R/getMODIS.R

Description

Find and download MODIS data for a specific product, area, and time period. The function returned is list of filenames that may have been downloaded.

Usage

1
getModis(product, start_date, end_date, aoi, download = FALSE, path, version="006", limit=100000, server="LP DAAC", ...)

Arguments

product

character. Supported products can be found using getProducts

start_date

character. Start date for the data requested formatted yyyy-m-d

end_date

Character. end date for the data requested formatted yyyy-m-d

aoi

numeric vector of four elements (minimum longitude, maximum longitude, minimum latitude, maximum latitude) encompassing the area of interest. Or a SpatExtent or Extent object, or any object from which an Extent can be extracted (see examples)

download

logical. If TRUE data will be downloaded unless it is present in the download directory

path

character. Path name indicating where to store the data

version

character

limit

integer > 0

server

character

...

Additional arguments. These can be product specific. See Details)

Details

If no data is available between start_date and end_date, files for the closest dates are returned.

Value

character vector of file names pointing to the downloaded files (if download=TRUE)

References

https://rspatial.org/terra/modis/

See Also

getProducts

Examples

1
2
3
4
5
6
7
8
9
  
product <- "MOD09A1"
sdate <- "2019-05-17" 
edate <- "2019-05-23"
area <- c(33, 34, -5, -4)
dir <- tempdir()
f <- getModis(product = product,
            start_date = sdate, end_date = edate,
            aoi = area, download = FALSE, path=dir)

ani-ghosh/luna_dev documentation built on Nov. 18, 2019, 12:02 a.m.