modSearch | R Documentation |
modSearch
searches MODIS images in the
NASA Common Metadata Repository
(CMR) concerning a particular location and date interval. The function returns a
character
vector with the names of the images and their uniform resource
locators (URLs)
modSearch(product, collection = 6, verbose = FALSE, ...)
product |
the short name of the MODIS product. |
collection |
MODIS collection. By default, 6. |
verbose |
logical argument. If |
... |
arguments for nested functions:
|
modSearch
uses the
NASA Common Metadata
Repository (CMR) powered API. The catalogue of MODIS products can be found
here.
The catalogue shows the product short names and provides detailed information
about the product. By the time ‘RGISTools’ is released, NASA carries out the
maintenance of its website on Wednesdays, which may cause an error when
connecting to their server. You can get your ‘EarthData’ credentials
here.
The function can be used to retrieve the web address of the preview
(resType = "browseurl"
) or the actual image (resType = "url"
).
By default, the URL points towards the actual image.
a vector
with the url for image downloading.
## Not run: # load a spatial polygon object of Navarre with longitude/latitude coordinates data(ex.navarre) # searching MODIS MYD13A2 images between 2011 and 2013 by longitude/latitude # using a polygon class variable sres <- modSearch(product = "MYD13A2", startDate = as.Date("01-01-2011", "%d-%m-%Y"), endDate = as.Date("31-12-2013", "%d-%m-%Y"), collection = 6, extent = ex.navarre) # region of interest: defined based on longitude/latitude extent # searching MODIS MYD13A2 images in 2010 by longitude/latitude # using a extent class variable defined by the user aoi = extent(c(-2.49, -0.72, 41.91, 43.31)) sres <- modSearch(product = "MYD13A2", startDate = as.Date("01-01-2010", "%d-%m-%Y"), endDate = as.Date("31-12-2010", "%d-%m-%Y"), collection = 6, extent = aoi) head(sres) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.