Learn R Programming

RGISTools (version 0.9.7)

modPreview: Preview MODIS satellite images

Description

modPreview shows a preview of the n-th image from a set of search results.

Usage

modPreview(searchres, n, size = NULL)

Arguments

searchres

a vector with the results from modSearch.

n

a numeric argument identifying the location of the image in searchres.

size

a numeric argument specifying the size of the preview to be displayed, in pixels.

Details

The function shows a preview of the n-th output image from a search in the MODIS archives (modSearch), with resType = "browseurl"). The preview is downloaded from the `EarthData' Platform. Please, be aware that only some images may have a preview.

Examples

Run this code
# NOT RUN {
# load a spatial polygon object of Navarre
data(ex.navarre)
# retrieve jpg images covering Navarre region between 2011 and 2013
searchres <- modSearch(product = "MOD09GA",
                      startDate = as.Date("01-01-2011", "%d-%m-%Y"),
                      endDate = as.Date("31-12-2013", "%d-%m-%Y"),
                      collection = 6,
                      resType = "browseurl",
                      extent = ex.navarre)
                      
modPreview(searchres, 1)
modPreview(searchres, 1, size = 600)
# }

Run the code above in your browser using DataLab