lsEspaUpdateOrders: Updates the status of a request made to ESPA

Description Usage Arguments Details Value Examples

View source: R/lsEspaUpdateOrders.R

Description

lsEspaUpdateOrders checks the current status of a request made to EROS Centre Science Processing Architecture (ESPA) to pre-process Landsat level-1 images

Usage

1
2
3
4
5
6
7
lsEspaUpdateOrders(
  orders,
  username = NULL,
  password = NULL,
  c.handle = NULL,
  verbose = FALSE
)

Arguments

orders

a list of the requested orders as returned by lsEspaGetOrderImages.

username

USGS's ‘EarthExplorer’ username.

password

USGS's ‘EarthExplorer’ password.

c.handle

a curl handler created with the package 'curl' to stablish a connection with a preset password and username. This argument is mandatory if username and password are not defined.

verbose

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

Details

This function is part of a group of functions used to pre-process Landsat level 1 images. The pre-processing is carried out by ESPA on demand. lsEspaUpdateOrders uses the ID numbers gathered by lsEspaGetOrderImages regarding previous order requests to check the processing status. The function has to be run repeatedly until the status message states “complete”. All the status messages and their interpretation can be found in the ESPA's API User Guide.

Value

this function returns a dataframe with the updated order information from ESPA.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
src <- file.path(tempdir(),"Path_for_downloading_folder")
# search Landsat 7 level-1
search.res <- ls7Search(startDate = as.Date("01-01-2017", "%d-%m-%Y"),
                        endDate = as.Date("15-01-2017", "%d-%m-%Y"),
                        lonlat = c(-1.64323, 42.81687),
                        AppRoot = src)
# request to ESPA the prepocessing of level-1 images to get the surface reflectance
orders <- lsEspaOrderImages(search.res = search.res,
                            username = "username", 
                            password = "password", 
                            product = 'sr',
                            verbose = FALSE)
# get an ID for our request
orders <- lsEspaGetOrderImages(username = "username", 
                               password = "password")
# follow up the status of the request
orders <- lsEspaUpdateOrders(orders = orders,
                             username = "username", 
                             password = "password")

## End(Not run)

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