lsSearch: Search Landsat 7-8 images using EarthExplorer API

Description Usage Arguments Value Examples

View source: R/lsSearch.R

Description

lsSearch searches Landsat 7-8 images in the EarthExplorer API concerning a particular location and date interval. The function returns a data.frame with the names of the images and their metadata.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
lsSearch(
  product,
  startDate,
  endDate,
  region,
  username,
  password,
  dates,
  logout = TRUE,
  verbose = FALSE,
  ...
)

Arguments

product

the name of the dataset. Avaliable names saved in ‘RGISTools’ (getRGISToolsOpt("EE.DataSets")).

startDate

a Date class object with the starting date of the study period. This argument is mandatory if dates is not defined.

endDate

a Date class object with the ending date of the study period. This argument is mandatory if dates is not defined.

region

a Spatial*, projected raster*, o r sf class object defining the area of interest. This argument is mandatory if pathrow, extent, or lonlat are not defined.

username

NASA’s ‘EarthData’ username.

password

NASA’s ‘EarthData’ password.

dates

a vector with the capturing dates being searched. This argument is mandatory if startDate and endDate are not defined.

logout

logical argument. If TRUE, logges out from EarthExplorer API

verbose

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

...

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 region, extent or lonlat are not provided. Ex. list(c(200,31),c(200,30)).

  • lonlat a vector with the longitude/latitude (EPSG:4326) coordinates of the point of interest. Ex. c(-1.64323,42.81687). This argument is mandatory if region, pathrow, or lonlat are not defined.

  • extent an extent, Raster*, or Spatial* object representing the region of interest with longitude/latitude (EPSG:4326) coordinates. This argument is mandatory if region, pathrow or lonlat are not defined.

Value

a data.frame with the name of the images and their metadata.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## Not run: 
# search by path and row numbers of a tile
getRGISToolsOpt("EE.DataSets")
sres <- lsSearch(product = "LANDSAT_8_C1",
                 startDate = as.Date("01-01-2011", "%d-%m-%Y"),
                 endDate = as.Date("31-12-2013", "%d-%m-%Y"),
                 username = "username",
                 password = "password",
                 region = ex.navarre,
                 pathrow = list(c(200,31),c(200,30)))
                 
sres <- lsSearch(product = "LANDSAT_8_C1",
                 startDate = as.Date("01-01-2011", "%d-%m-%Y"),
                 endDate = as.Date("31-12-2013", "%d-%m-%Y"),
                 username = "username",
                 password = "password",
                 lonlat = c(-1.64323,42.81687))
                                   
                  
# search by extent (long/lat coordinates)
# load a spatial polygon object of Navarre
data(ex.navarre)
sres <- lsSearch(product = "LANDSAT_8_C1",
                 startDate = as.Date("01-01-2011", "%d-%m-%Y"),
                 endDate = as.Date("31-12-2013", "%d-%m-%Y"),
                 username = "username",
                 password = "password",
                 extent = ex.navarre)

## End(Not run)

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