getLandsat | R Documentation |
Find and download Landsat data for a specific product, area, and time period. The function returned is list of filenames that may have been downloaded.
getLandsat(product="Landsat_8_OLI_TIRS_C1", start_date, end_date, aoi,
download=FALSE, path, username, password, version="1",
limit=100000, server="AWS", overwrite=FALSE, ...)
product |
character. Supported products can be found using |
start_date |
character. Start date for the data requested formatted yyyy-m-d |
end_date |
character. end date for the data requested formatted yyyy-m-d |
aoi |
numeric vector of four elements (minimum longitude, maximum longitude, minimum latitude, maximum latitude) encompassing the area of interest. Or a SpatExtent or Extent object, or any object from which an Extent can be extracted (see examples) |
download |
logical. If |
path |
character. Path name indicating where to store the data |
username |
character. EROS user name (see Details) |
password |
character. EROS password (see Details) |
version |
character |
limit |
integer > 0 |
server |
character. Either AWS (Landsat 8 only) or ERS. See Details |
overwrite |
logical. If |
... |
Additional arguments. These can be product specific. See Details) |
The AWS (Amazon Web Services) server provides Landsat 8 data only. It does not require credentials (username and password).
The EROS service from the USGS also provides other Landsat products. To use for downloading data, you need to provide "ERS" credentials. If you do not have these, you can sign up for a free account here: https://ers.cr.usgs.gov/register
If no data is available between start_date
and end_date
, files for the closest dates are returned.
character vector of file names pointing to the downloaded files (if download=TRUE
)
getProducts
, getNASA
product <- "Landsat_8_OLI_TIRS_C1"
sdate <- "2019-05-01"
edate <- "2019-05-30"
area <- c(33, 34, -5, -4)
dir <- tempdir()
f <- getLandsat(product, start_date=sdate, end_date=edate,
aoi=area, download=FALSE, path=dir)
# An example of ARD Tiles from ERS server
product <- "Landsat4-8_ARD_US_C1"
area <- c(-122.43, -121.50, 38.32, 38.91)
f1 <- getLandsat(product, start_date=sdate, end_date=edate,
aoi=area, download=FALSE, path=dir, server="EROS")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.