getCollection: Get available collections of MODIS product(s)

Description Usage Arguments Value Author(s) See Also Examples

View source: R/getCollection.R

Description

Checks and retirves MODIS collection.

Usage

1
2
getCollection(product, collection=NULL, newest=TRUE, 
forceCheck=FALSE, as="character", quiet=TRUE)

Arguments

product

Character. MODIS grid product to check for existing collections. For 'MODIS TERRA Vegetation Indices at 250 m ground resolution' use: 'MOD13Q1'. For vegetation indices from TERRA and AQUA use 'MxD13Q1'. See getProduct() for supported products.

collection

If provided the function only checks if the collection exists and returns the collection number formatted on base of the as parameter or a FALSE in case the collection doesn't exists. The check is performed on the primary dataseouce 'LP DAAC' https://lpdaac.usgs.gov/.

newest

Logical. Default TRUE, return only the number of the newest collection. or FALSE all available collections

forceCheck

Logical. Default FALSE, if TRUE the function connects to the 'LP DAAC'-FTP and gets available collections. Since the collections doesn't change very frequently this check once done it is rarely needed.

as

character. Default 'character', and returns the typical 3 digits long collection number ie: "005". Other possibility is to set it to 'numeric' what would give as a result the numeric 5

quiet

Default TRUE

Value

Vector. With three digits character or a numeric value, indicating the collection version(s). And a file in an hidden folder paste(MODIS:::.getDef('localArcPath'),'/.auxiliaries/collections.txt',sep="") as database for further calls. if collection is provided only the (formatted) collection is returned if available or a FALSE if not!

Author(s)

Matteo Mattiuzzi

See Also

getProduct

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

# update or get collections for MOD11C3 and MYD11C3
getCollection(product="M.D11C3")
getCollection(product="M.D11C3",newest=FALSE)

getCollection(product="M.D11C3",collection=3)
getCollection(product="M.D11C3",collection=41)
getCollection(product="M.D11C3",collection="041")
getCollection(product="M.D11C3",forceCheck=TRUE)

## End(Not run)

MODIS documentation built on May 2, 2019, 6:09 p.m.

Related to getCollection in MODIS...