s2_list | R Documentation |
The function retrieves the list of available Sentinel-2 products satisfying given search criteria.
s2_list(
spatial_extent = NULL,
tile = NULL,
orbit = NULL,
time_interval = c(Sys.Date() - 10, Sys.Date()),
time_period = "full",
level = "auto",
server = "gcloud",
apihub = NA,
service = "apihub",
max_cloud = 100,
availability,
tmpdir = NA,
output_type = "deprecated"
)
spatial_extent |
A valid spatial object object of class |
tile |
|
orbit |
|
time_interval |
Dates to be considered, as a temporal vector (class POSIXct or
Date, or string in |
time_period |
(optional) Character:
|
level |
Character vector with one of the following: - "auto" (default): check if level-2A is available on SciHub: if so, list it; if not, list the corresponding level-1C product - "L1C": list available level-1C products - "L2A": list available level-2A products |
server |
(deprecate) Character vector of length 1, with the names of
the servers on which SAFE archives are searched.
Currently, only |
apihub |
deprecated |
service |
deprecated |
max_cloud |
Integer number (0-100) containing the maximum cloud level of the tiles to be listed (default: no filter). |
availability |
Character argument, determining which products have to be returned:
|
tmpdir |
(optional) Path where intermediate files (xml) will be created
(it is used only if argument |
output_type |
Deprecated (use |
Important: to search and download from Google Cloud, Google Cloud SDK must be installed and configured following the indications in https://cloud.google.com/sdk/docs/install. Notice also that querying Google Cloud can be very slow (while downloading them is generally faster than from SciHub).
An object of class safelist.
The attribute online
contains logical values: in case
availability != "ignore"
, values are TRUE / FALSE for
products available for download / stored in the Long Term Archive;
otherwise, values are set to NA.
License: GPL 3.0
Lorenzo Busetto, phD (2019) - Inspired by
function getSentinel_query
of package
getSpatialData
by J. Schwalb-Willmann
Luigi Ranghetti, phD (2019)
L. Ranghetti, M. Boschetti, F. Nutini, L. Busetto (2020). "sen2r": An R toolbox for automatically downloading and preprocessing Sentinel-2 satellite data. Computers & Geosciences, 139, 104473. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.cageo.2020.104473")}, URL: https://sen2r.ranghetti.info/.
pos <- sf::st_sfc(sf::st_point(c(9.85,45.81)), crs = 4326)
time_window <- as.Date(c("2020-08-01", "2020-08-11"))
# Full-period list
if (is_gcloud_configured()) {
example_s2_list <- s2_list(
spatial_extent = pos,
tile = "32TNR",
time_interval = time_window,
orbit = "065"
)
} else {
example_s2_list <- as(character(), "safelist")
}
print(example_s2_list)
# Print the dates of the retrieved products
safe_getMetadata(example_s2_list, "sensing_datetime")
# Seasonal-period list
if (is_gcloud_configured()) {
example_s2_list <- s2_list(
spatial_extent = pos,
tile = "32TNR",
time_interval = time_window,
time_period = "seasonal"
)
} else {
example_s2_list <- as(character(), "safelist")
}
print(example_s2_list)
# Print the dates of the retrieved products
safe_getMetadata(example_s2_list, "sensing_datetime")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.