modPreview: Preview MODIS satellite images

Description Usage Arguments Details Value Examples

View source: R/modPreview.R

Description

modPreview shows a preview of the n-th image from a set of search results on an interactive map.

Usage

1
2
3
4
5
6
7
8
9
modPreview(
  searchres,
  n,
  dates,
  lpos = c(3, 2, 1),
  add.Layer = FALSE,
  verbose = FALSE,
  ...
)

Arguments

searchres

a vector with the results from modSearch.

n

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

dates

a vector with the dates being considered for previewing. This argument is mandatory if n is not defined.

lpos

vector argument. Defines the position of the red-green-blue layers to enable false color visualization.

add.Layer

logical argument. If TRUE, the function plots the image on an existing map. Allows combinations of images on a map using lsPreview and senPreview functions.

verbose

logical argument. If TRUE, the function prints the running steps and warnings.

...

arguments for nested functions:

  • arguments allowed by the viewRGB function from mapview packages are valid arguments.

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.

Value

this function does not return anything. It displays a preview of one of the search results.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# load a spatial polygon object of Navarre
data(ex.navarre)
# retrieve jpg images covering Navarre region between 2011 and 2013
sres <- modSearch(product = "MOD09GA",
                  startDate = as.Date("01-01-2011", "%d-%m-%Y"),
                  endDate = as.Date("31-12-2013", "%d-%m-%Y"),
                  collection = 6,
                  extent = ex.navarre)
                      
modPreview(sres,n=1)
modPreview(sres,2,add.Layer=T)

## End(Not run)

RGISTools documentation built on July 2, 2020, 3:58 a.m.