ls8Search
searches Landsat-8 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.
ls8Search(startDate, endDate, AppRoot, verbose = FALSE,
precise = FALSE, ...)
a Date
class object with the starting date of the
study period.
a Date
class object with the ending date of the
study period.
directory of the metadata file.
logical argument. If TRUE
, the function prints the
running steps and warnings.
logical argument. If TRUE
, conducts a thorough search,
tile by tile (slower).
arguments for nested functions:
pathrow
a list
of vectors with the path and row numbers
of the tiles concerning the region of interest. This argument is mandatory
if extent
or lonlat
are not provided. Ex.
list(c(200,31),c(200,30))
.
lonlat
a vector with the longitude/latitude coordinates of the
point of interest. Ex. c(-1.64323,42.81687)
.
extent
an extent
, Raster*
, or
Spatial*
object representing the region of interest with
longitude/latitude coordinates. This argument is mandatory if
pathrow
or lonlat
are not defined.
column names in the .LS8MD data.frame
and their values.
a data.frame
with the name of the images and their metadata.
ls8Search
searches images in the metadata file. If the metadata was
downloaded before to the current directory, ls8Search
will use this
metadata by default. In case the metadata was not downloaded yet,
ls8Search
will make that call for you.
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
number 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 extent
, lonlat
or polygon
, since they do
not require any prior knowledge about 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=<U+201D>Y<U+201D>
must be added as an argument of the function
(see the examples).
# NOT RUN {
# search by path and row numbers of a tile
src <- paste0(tempdir(),"/Path_for_downloading_folder")
search.res <- ls8Search(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 = src)
# search by extent (long/lat coordinates)
# load a spatial polygon object of Navarre
data(ex.navarre)
search.res <- ls8Search(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 = src)
# search by extent (fast mode)
search.res <- ls8Search(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 = src)
# remove metadata to free memory space
lsRemoveMetadata()
# }
Run the code above in your browser using DataLab