# 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")
# }
Run the code above in your browser using DataLab