lsPreview | R Documentation |
lsPreview
shows a preview of the n
-th image from a set of
search results on an interactive map.
lsPreview( searchres, n, dates, lpos = c(3, 2, 1), add.Layer = FALSE, verbose = FALSE, ... )
searchres |
a |
n |
a |
dates |
a vector of |
lpos |
vector argument. Defines the position of the red-green-blue layers to enable false color visualization. |
add.Layer |
logical argument. If |
verbose |
logical argument. If |
... |
arguments for nested functions:
|
The function shows a preview of the n
-th output image from a search
in the Landsat archives (ls7Search
or ls8Search
,
with browseAvailable = "Y"
). The preview is downloaded from
USGS Bulk Metadata Service.
Please, be aware that only some images may have a preview.
this function does not return anything. It displays a preview of one of the search results.
## Not run: # load a spatial polygon object of Navarre data(ex.navarre) wdir <- file.path(tempdir(),"Path_for_downloading_folder") # retrieve jpg images covering Navarre between 2011 and 2013 sres <- ls7Search(startDate = as.Date("01-01-2011", "%d-%m-%Y"), endDate = as.Date("31-12-2013", "%d-%m-%Y"), extent = ex.navarre, precise = TRUE, browseAvaliable = "Y", AppRoot = wdir) lsPreview(sres, 1) # filter the images with less than 1% pixels covered by clouds sres.cloud.free = subset(sres, sres$cloudCover < 1) lsPreview(sres.cloud.free, 1) lsPreview(sres.cloud.free, 2,add.Layer = TRUE) # plot all the images in one date lsPreview(sres.cloud.free,dates=as.Date("2013-09-04")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.