Description Usage Arguments Value Note Author(s) Examples
The function retrieves the list of available Sentinel-2 products basing on search criteria. It makes use of s2download python function only to retrieve the list of files, without downloading and correcting them.
1 2 3 |
spatial_extent |
A valid spatial object object of class |
tile |
Single Sentinel-2 Tile string (5-length character) |
orbit |
Single Sentinel-2 orbit number |
time_interval |
a temporal vector (class POSIXct or Date) of length 1 (specific day) or 2 (time interval). |
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 |
ignore_ingestion_time |
(optional) Logical: if TRUE (default),
the research is performed basing only on the sensing date and time
(the time in which the image was acquired), ignoring the ingestion date
and time (the time the image was ingested).
If FALSE, products with the ingestion time specified with |
apihub |
Path of the "apihub.txt" file containing credentials of scihub account. If NA (default) the default credentials (username "user", password "user") will be used. |
max_cloud |
Integer number (0-100) containing the maximum cloud level of the tiles to be listed (default: no filter). |
A vector of available products (being each element an URL, and its name the product name).
License: GPL 3.0
Luigi Ranghetti, phD (2017) ranghetti.l@irea.cnr.it
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 31 | ## Not run:
pos <- sf::st_sfc(sf::st_point(c(9.85,45.81)), crs = 4326)
time_window <- as.Date(c("2016-05-01", "2017-07-30"))
# Full-period list
example_s2_list <- s2_list(
spatial_extent = pos,
tile = "32TNR",
time_interval = time_window,
orbit = "065"
)
print(example_s2_list)
# Print the dates of the retrieved products
as.vector(sort(sapply(names(example_s2_list), function(x) {
strftime(safe_getMetadata(x,"nameinfo")$sensing_datetime)
})))
# Seasonal-period list
example_s2_list <- s2_list(
spatial_extent = pos,
tile = "32TNR",
time_interval = time_window,
time_period = "seasonal"
)
print(example_s2_list)
# Print the dates of the retrieved products
as.vector(sort(sapply(names(example_s2_list), function(x) {
strftime(safe_getMetadata(x,"nameinfo")$sensing_datetime)
})))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.