ls7Search | R Documentation |
ls7Search
searches Landsat-7 images in the Landsat repository concerning
a particular location and date interval. The function returns a
data.frame
with the names of the images and their metadata.
ls7Search(AppRoot, verbose = FALSE, precise = FALSE, ...)
AppRoot |
directory of the metadata file. |
verbose |
logical argument. If |
precise |
logical argument. If |
... |
arguments for nested functions:
|
ls7Search
searches images in the metadata file. If the metadata was
downloaded before to the current directory, ls7Search
will use this
metadata by default. In case the metadata was not downloaded before,
ls7Search
will make that call for you. The function creates the
following subfolders "Landsat-8/metadata", where the metadata file is
located.
Landsat images are organized by tiles, which have a unique path and row
numbers according to the
Worldide Reference System.
The fastest way to search an image in the metadata file is by path and row
(pathrow
). This method requires to know in advance the path and row
numbers of the tile that is relevant for your region of interest. From the
user's standpoint, the simplest way to search a time series of Landsat-7
images is by region
, extent
, or lonlat
, since they do
not require any prior knowledge about the tiles.
The function can screen the results by any other attribute in the metadata.
For instance, to filter the imagery with an available preview, the
browseAvaliable=”Y”
must be added as an argument of the function
(see the examples).
a data.frame
with the name of the images and their metadata.
## Not run: wdir <- file.path(tempdir(),"Path_for_downloading_folder") # search by path and row numbers of a tile sres <- ls7Search(startDate = as.Date("01-01-2011", "%d-%m-%Y"), endDate = as.Date("31-12-2013", "%d-%m-%Y"), pathrow = list(c(200,31),c(200,30)), browseAvaliable = "Y", AppRoot = wdir) # search by point coordinates (long/lat coordinates) sres <- ls7Search(startDate = as.Date("01-01-2011", "%d-%m-%Y"), endDate = as.Date("31-12-2013", "%d-%m-%Y"), lonlat = c(-1.64323,42.81687), browseAvaliable = "Y", AppRoot = wdir) # search by extent (long/lat coordinates) # load a spatial polygon object of Navarre data(ex.navarre) 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) # search by extent (fast mode) sres <- ls7Search(startDate = as.Date("01-01-2011","%d-%m-%Y"), endDate = as.Date("31-12-2013","%d-%m-%Y"), extent = ex.navarre, precise = FALSE, browseAvaliable = "Y", AppRoot = wdir) # remove metadata to free memory space lsRemoveMetadata() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.