diff --git a/DESCRIPTION b/DESCRIPTION index 97e11e3d..288f29ce 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: sen2r Type: Package Title: Find, Download and Process Sentinel-2 Data -Version: 1.5.5.9000 +Version: 1.6.0 Authors@R: c(person("Luigi", "Ranghetti", email = "rpackages.ranghetti@gmail.com", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index d6cc3af8..62de76a2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,18 @@ +# Version 1.6.0 + +## Major changes +- Remove the possibility to search/download SAFE archives from ESA SciHub due + to its discontinuation. +- Set `"gcloud"` as the default SAFE server. +- Begin voiding some functions related to ESA SciHub: `s2_order()`, + `safe_is_online()`, `*_scihub_login()`, + `"scihub"` methods in `s2_list()` and `s2_download()`. + +## Documentation +- _Partially_ updating the documentation to reflect the above changes. +- Remove old system requirements (#463). +- Remove old references to {rgdal}. + # Version 1.5.5 ## Minor changes diff --git a/R/check_param_list.R b/R/check_param_list.R index 2e7f277b..f3939b85 100644 --- a/R/check_param_list.R +++ b/R/check_param_list.R @@ -154,6 +154,14 @@ check_param_list <- function(pm, type = "string", check_paths = FALSE, correct = # -- server -- + if ("scihub" %in% pm$server) { + print_message( + type = type, + "Parameter \"server\" = 'scihub' is deprecated; currently, only 'gcloud' ", + "can be used (setting to the default)." + ) + pm$server <- pm_def$server + } if (all(!pm$server %in% c("scihub", "gcloud"))) { print_message( type = type, diff --git a/R/s2_download.R b/R/s2_download.R index fda1cd00..976fd6b8 100644 --- a/R/s2_download.R +++ b/R/s2_download.R @@ -43,9 +43,9 @@ #' #' @examples #' \dontrun{ -#' single_s2 <- paste0("https://apihub.copernicus.eu/apihub/odata/v1/", -#' "Products(\'c7142722-42bf-4f93-b8c5-59fd1792c430\')/$value") -#' names(single_s2) <- "S2A_MSIL1C_20170613T101031_N0205_R022_T32TQQ_20170613T101608.SAFE" +#' single_s2 <- paste0("gs://gcp-public-data-sentinel-2/L2/tiles/32/T/NR/", +#' "S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE/") +#' names(single_s2) <- "S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE" #' # (this is equivalent to: #' # single_s2 <- example_s2_list[1] #' # where example_s2_list is the output of the example of the @@ -53,15 +53,7 @@ #' #' # Download the whole product #' s2_download(single_s2, outdir=tempdir()) -#' -#' #' # Download the whole product - using aria2 -#' s2_download(single_s2, outdir=tempdir(), downloader = "aria2") -#' -#' # Download more products, ordering the ones stored in the Long Term Archive -#' pos <- sf::st_sfc(sf::st_point(c(-57.8815,-51.6954)), crs = 4326) -#' time_window <- as.Date(c("2018-02-21", "2018-03-20")) -#' list_safe <- s2_list(spatial_extent = pos, time_interval = time_window) -#' s2_download(list_safe, outdir=tempdir()) +#' file.info(file.path(tempdir(),names(single_s2))) #' } s2_download <- function( diff --git a/R/s2_download_scihub.R b/R/s2_download_scihub.R index 6f8a5aa1..df5e33a4 100644 --- a/R/s2_download_scihub.R +++ b/R/s2_download_scihub.R @@ -1,238 +1,8 @@ .s2_download_scihub <- function( s2_prodlist, s2_meta, outdir, apihub, service, downloader, abort, overwrite ) { - - # to avoid NOTE on check - i <- mission <- level <- sensing_datetime <- - id_orbit <- id_tile <- footprint <- NULL - - # Check connection - if (!check_scihub_connection()) { - print_message( - type = "error", - "Impossible to reach the SciHub server ", - "(internet connection or SciHub may be down)." - ) - } - - # read credentials - if (length(s2_prodlist) > 0) { - creds <- read_scihub_login(apihub) - } - - # check the used service - if (!service %in% c("apihub", "dhus", NA)) { - print_message( - type = "error", - "Argument 'service' can be only \"apihub\" or \"dhus\"; ", - "leaving the input URLs as are." - ) - } else if (!is.na(service)) { - s2_prodlist <- gsub( - "^https://((scihub)|(apihub)).copernicus.eu/((apihub)|(dhus))/odata", - paste0("https://",ifelse(service=="dhus","scihub","apihub"), - ".copernicus.eu/",service,"/odata"), - s2_prodlist - ) - } - - foreach( - i = seq_along(s2_prodlist), - .combine = c - ) %do% { - - link <- s2_prodlist[i] - zip_path <- file.path(outdir, paste0(names(s2_prodlist[i]),".zip")) - safe_path <- gsub("\\.zip$", "", zip_path) - - # if footprint exists, check if existing SAFEs are actually equivalent - if (!is.null(s2_meta$footprint)) { - # regular expression to detect if equivalent products already exist - safe_regex <- s2_meta[i,paste0( - "^S",mission,"\\_MSIL",level,"\\_",strftime(sensing_datetime,"%Y%m%dT%H%M%S"), - "\\_N[0-9]{4}\\_R",id_orbit,"\\_T",id_tile,"\\_[0-9]{8}T[0-9]{6}\\.SAFE$" - )] - safe_existing <- list.files(dirname(zip_path), safe_regex, full.names = TRUE) - safe_existing <- safe_existing[safe_isvalid(safe_existing)] - # check centroids - safe_existing_footprints <- safe_getMetadata(safe_existing, "footprint") - safe_existing <- try({ - safe_existing_centroids <- st_transform( - st_centroid(st_transform(st_as_sfc(safe_existing_footprints, crs = 4326), 3857)), - 4326 - ) - safe_centroid <- st_transform( - st_centroid(st_transform(st_as_sfc(s2_meta[i,footprint], crs = 4326), 3857)), - 4326 - ) - # remove SAFE with the same (approximatively) centroid - safe_existing[ - apply(round(st_coordinates(safe_existing_centroids), 2), 1, paste, collapse = " ") == - apply(round(st_coordinates(safe_centroid), 2), 1, paste, collapse = " ") - ] - }, silent = TRUE) - if (inherits(safe_existing, "try-error")) {safe_existing <- character()} - } else { - # if footprints are not available, avoid checking - safe_existing <- safe_path[dir.exists(safe_path)] - } - - if (any(overwrite == TRUE, length(safe_existing) == 0)) { - - print_message( - type = "message", - date = TRUE, - "Downloading Sentinel-2 image ", i, - " of ",length(s2_prodlist)," (",basename(safe_path),")..." - ) - - if (downloader %in% c("builtin", "wget")) { # wget left for compatibility - - out_bar <- if (all(inherits(stdout(), "terminal"), interactive())) { - NULL - } else { - file(out_bar_path <- tempfile(), open = "a") - } - - times_429 <- 10 # if 429 "too many requests", retry up to 10 times - while (times_429 > 0) { - download <- RETRY( - verb = "GET", - url = as.character(link), - config = authenticate(creds[1,1], creds[1,2]), - times = 5, pause_cap = 8, - progress(con = if (length(out_bar) > 0) {out_bar} else {stdout()}), - write_disk(zip_path, overwrite = TRUE) - ) - times_429 <-if (download$status_code != 429) {0} else {times_429 - 1} - } - - if (length(out_bar) > 0) { - close(out_bar) - invisible(file.remove(out_bar_path)) - } - } else if (grepl("^aria2c?$", downloader)) { - - binpaths <- load_binpaths("aria2") - if (Sys.info()["sysname"] != "Windows") { - link_aria <- gsub("/\\$value", "/\\\\$value", link) - } else { - link_aria <- link - } - aria_string <- paste0( - binpaths$aria2c, " -x 2 --check-certificate=false -d ", - dirname(zip_path), - " -o ", basename(zip_path), - " ", "\"", as.character(link_aria), "\"", - " --allow-overwrite --file-allocation=none --retry-wait=2", - " --http-user=", "\"", creds[1,1], "\"", - " --http-passwd=", "\"", creds[1,2], "\"", - " --max-tries=10" - ) - download <- try({ - system(aria_string, intern = Sys.info()["sysname"] == "Windows") - }) - - } - - # check if the user asked to download a LTA product - download_is_lta <- if (inherits(download, "response")) { - download$status_code == 202 - } else if (inherits(download, "integer")) { - download == 22 - } else FALSE - if (download_is_lta) { - # TODO - } - - if (inherits(download, "try-error")) { - suppressWarnings(file.remove(zip_path)) - suppressWarnings(file.remove(paste0(zip_path,".aria2"))) - print_message( - type = ifelse(abort == TRUE, "error", "warning"), - "Download of file", link, "failed more than 10 times ", - "(internet connection or SciHub may be down)." - ) - safe_newname <- character(0) - } else { - # check md5 - check_md5 <- tryCatch({ - requireNamespace("tools") - sel_md5 <- RETRY( - verb = "GET", - url = gsub("\\$value$", "Checksum/Value/$value", as.character(link)), - config = authenticate(creds[1,1], creds[1,2]), - write_disk(md5file <- tempfile(), overwrite = TRUE) - ) - md5 <- toupper(readLines(md5file, warn = FALSE)) == - toupper(tools::md5sum(zip_path)) - file.remove(md5file) - md5 - }, error = function(e) {logical(0)}) - if (any(!check_md5 %in% c(TRUE, FALSE), length(check_md5) == 0)) { - print_message( - type = "warning", - "File ", names(link), " cannot be checked", - if (!requireNamespace("tools", quietly = TRUE)) { - "(package \"tools\" needs to be installed)" - }, - ". Please verify if the download was successful." - ) - } else if (!check_md5) { - file.remove(zip_path) - print_message( - type = ifelse(abort == TRUE, "error", "warning"), - "Download of file ", names(link), " was incomplete (Md5sum check failed). ", - "Please retry to launch the download." - ) - safe_newname <- character(0) - } - # remove existing SAFE - if (dir.exists(safe_path)) { - unlink(safe_path, recursive = TRUE) - } - # update SAFE name (possible different processing date) - zip_content <- try(unzip(zip_path, list = TRUE), silent = TRUE) - if (inherits(zip_content, "try-error")) { - file.remove(zip_path) - print_message( - type = ifelse(abort == TRUE, "error", "warning"), - "File ", names(link), " cannot be unzipped. ", - "Please retry later to launch the download." - ) - safe_newname <- character(0) - } else { - safe_newname <- setNames( - link, - unique(gsub("(^[^\\/]+)\\/.*$", "\\1", zip_content$Name)) - ) - # unzip - unzip(zip_path, exdir = dirname(zip_path)) - file.remove(zip_path) - } - } - - } else { - - print_message( - type = "message", - date = TRUE, - "Skipping Sentinel-2 image ", i, - " of ",length(s2_prodlist)," ", - "since the corresponding folder already exists." - ) - - - # safe_existing_meta <- safe_getMetadata(safe_existing, info = "nameinfo") - # safe_newname <- safe_existing_meta$name[ - # order(nn(safe_existing_meta$creation_datetime), decreasing = TRUE)[1] - # ] - safe_newname <- setNames(link, basename(safe_path)) - - } - - # return to foreach - as(safe_newname, "safelist") - - } + print_message( + type = "error", + "The SciHub server can no longer be accessed." + ) } diff --git a/R/s2_gui.R b/R/s2_gui.R index 367b72ef..39a3a935 100644 --- a/R/s2_gui.R +++ b/R/s2_gui.R @@ -503,7 +503,7 @@ s2_gui <- function(param_list = NULL, fluidRow( column( - width=4, + width=5, # online_mode (online/offline mode) radioButtons( @@ -526,17 +526,17 @@ s2_gui <- function(param_list = NULL, inline = TRUE ), - checkboxGroupInput( - "server", - label = span( - "Input servers\u2000", - actionLink("help_server", icon("question-circle")), "\u2004", - span(style="color:#3c8dbc;", tags$strong("NEW")) - ), - choiceNames = list("Google Cloud", "ESA Hub"), - choiceValues = list("gcloud", "scihub"), - selected = c("scihub") - ), + # checkboxGroupInput( + # "server", + # label = span( + # "Input servers\u2000", + # actionLink("help_server", icon("question-circle")), "\u2004", + # span(style="color:#3c8dbc;", tags$strong("NEW")) + # ), + # choiceNames = list("Google Cloud"), + # choiceValues = list("gcloud"), + # selected = c("gcloud") + # ), conditionalPanel( condition = "input.online == 'TRUE'", @@ -552,40 +552,40 @@ s2_gui <- function(param_list = NULL, ) ) ), + # column( + # width=3, + # conditionalPanel( + # condition = "input.online == 'TRUE' && input.server.indexOf('scihub') != -1", + # div( + # style="padding-bottom:5px;", + # strong("ESA Hub options") + # ), + # checkboxInput( + # "make_lta_order", + # label = span( + # "Order from LTA\u2000", + # actionLink("help_lta_order", icon("question-circle")) + # ), + # value = TRUE + # ), + # checkboxInput( + # "downloader_aria2", + # label = span( + # "Use aria2\u2000", + # actionLink("help_downloader", icon("question-circle")) + # ), + # value = FALSE + # ), + # actionButton( + # "scihub_md", + # label = "\u2000Login to SciHub", + # icon = icon("user-circle") + # ) + # ) + # + # ), column( - width=3, - conditionalPanel( - condition = "input.online == 'TRUE' && input.server.indexOf('scihub') != -1", - div( - style="padding-bottom:5px;", - strong("ESA Hub options") - ), - checkboxInput( - "make_lta_order", - label = span( - "Order from LTA\u2000", - actionLink("help_lta_order", icon("question-circle")) - ), - value = TRUE - ), - checkboxInput( - "downloader_aria2", - label = span( - "Use aria2\u2000", - actionLink("help_downloader", icon("question-circle")) - ), - value = FALSE - ), - actionButton( - "scihub_md", - label = "\u2000Login to SciHub", - icon = icon("user-circle") - ) - ) - - ), - column( - width=5, + width=7, # overwrite SAFE radioButtons( @@ -1732,22 +1732,25 @@ s2_gui <- function(param_list = NULL, }) # Google Cloud options - observeEvent(input$server, { + if (is.null(binpaths$gsutil)) { + # TODO add message alert about Gcloud + } + observeEvent(c(input$server, input$online), { # Disable Google Cloud download if it is not configured if (is.null(binpaths$gsutil)) { - updateCheckboxGroupInput( - session, "server", - selected = "scihub" + updateRadioButtons( + session, "online", + selected = FALSE ) - disable("server") + disable("online") } else { - enable("server") - } - # Leave at list one selected - if (length(input$server) == 0) { - updateCheckboxGroupInput(session, "server", selected = rv$server_prev) + enable("online") } - rv$server_prev <- input$server + # # Leave at list one selected + # if (length(input$server) == 0) { + # updateCheckboxGroupInput(session, "server", selected = rv$server_prev) + # } + # rv$server_prev <- input$server }, ignoreNULL = FALSE) @@ -2975,51 +2978,61 @@ s2_gui <- function(param_list = NULL, "with Sen2Cor if the corresponding level-1C images are available);", "the user can still filter them spatially and temporally,", "but this is not mandatory (if no parameters are specified,", - "all the SAFE images are processed).")), + "all the SAFE images are processed)." + )), + p(HTML( + "Notice that the Online mode is available only if", + "Google Cloud SDK is correctly installed and configured; to do it:", + "", + "For details, see this post." + )), easyClose = TRUE, footer = NULL )) }) - observeEvent(input$help_server, { + observeEvent(TRUE, { # TEMPORARY show this when the GUI is open showModal(modalDialog( title = "Input SAFE servers", p(HTML( - "Input Sentinel-2 SAFE archives can be searched and retrieved from", - "two sources:", - "", - "The two data sources can be also used in combination (in this case,", - "archives are searched on Google Cloud first, and on ESA Hub subsequently)." + "href='https://cloud.google.com/sdk/docs/install'", + "target='_blank'>official instructions.", )), p(HTML( - "By default, SAFE archives are searched on ESA Hub.", - "After the reduction of the retention time to 30 days,", - "it is highly probable that products older then 30 days will not be", - "found online (see this issue).", - "Moreover, after ordering them from Long Term Archive (LTA),", - "in several cases corrupted archives are obtained (see this issue), and refer to this reference", - "for details about the ESA LTA policy).", - "To avoid this problems, the research and download from Google Cloud", - "was implemented." + "This mode is not optimal (a modern STAC API approach should be used),", + "and searching products could be a very slow process.", + "Nevertheless, the old official data source, ESA Hub, is no", + "longer available since November 2023 due to it discontinuation;", + "since sen2r is not actively maintained, the replacement with the new", + "Copernicus Data Space", + "is not planned (anyone who wants to help can contribute on GitHub)." )), p(HTML( - "Notice that Google Cloud is an experimental data source;", - "in case of problems, please report them opening a", - "GitHub Issue." + "Notice that the Online mode is available only if", + "Google Cloud SDK is correctly installed and configured; to do it:", + "
  • install Google Cloud SDK following the", + "official instructions;
  • ", + "
  • configure sen2r to use Google Cloud SDK launching the function", + "check_gcloud().
", + "For details, see this post." )), easyClose = TRUE, footer = NULL @@ -3136,25 +3149,25 @@ s2_gui <- function(param_list = NULL, )) }) - observeEvent(input$help_register_scihub, { - showModal(modalDialog( - title = "New/edit SciHub credentials", - size = "s", - p(HTML( - "Notice that SciHub credentials are recognised by API Hub", - "(used by sen2r) with a delay of one week (see", - "this alert);", - "for this reason, newly created credentials and password edits", - "are generally not immediately recognised." - )), - a("Register new account", href="https://scihub.copernicus.eu/dhus/#/self-registration", target="_blank"), - "\u2000\u2014\u2000", - a("Forgot password?", href="https://scihub.copernicus.eu/dhus/#/forgot-password", target="_blank"), - easyClose = TRUE, - footer = NULL - )) - }) + # observeEvent(input$help_register_scihub, { + # showModal(modalDialog( + # title = "New/edit SciHub credentials", + # size = "s", + # p(HTML( + # "Notice that SciHub credentials are recognised by API Hub", + # "(used by sen2r) with a delay of one week (see", + # "this alert);", + # "for this reason, newly created credentials and password edits", + # "are generally not immediately recognised." + # )), + # a("Register new account", href="https://scihub.copernicus.eu/dhus/#/self-registration", target="_blank"), + # "\u2000\u2014\u2000", + # a("Forgot password?", href="https://scihub.copernicus.eu/dhus/#/forgot-password", target="_blank"), + # easyClose = TRUE, + # footer = NULL + # )) + # }) # observeEvent(input$fix_online, { # showModal(modalDialog( diff --git a/R/s2_list.R b/R/s2_list.R index c30333c9..e6958066 100644 --- a/R/s2_list.R +++ b/R/s2_list.R @@ -1,30 +1,11 @@ #' @title Retrieve list of available S2 products. #' @description The function retrieves the list of available Sentinel-2 #' products satisfying given search criteria. -#' @details By default, SAFE archives are searched on ESA Sentinel Hub -#' (argument `server = "scihub"`), which is the faster and stable option. -#' After the reduction of the retention time to 30 days, -#' it is highly probable that products older then 30 days will not be found -#' online (see \url{https://github.com/ranghetti/sen2r/issues/408}). -#' Moreover, after ordering them from Long Term Archive (LTA), in several cases -#' corrupted archives are obtained -#' (see \url{https://github.com/ranghetti/sen2r/issues/406}, and refer to this -#' reference for details about the ESA LTA policy). -#' -#' To avoid this problems, the research and download from Google Cloud was -#' recently implemented. -#' Users can set `server = "gcloud"` to use this data exclusively, or -#' `server = c("scihub", "gcloud"), availability = "check"` -#' to search for products available on SciHub first, or on Google Cloud -#' subsequently. -#' **Important**: to search and download from Google Cloud, Google Cloud SDK +#' @details **Important**: to search and download from Google Cloud, Google Cloud SDK #' must be installed and configured following the indications in #' \url{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). -#' -#' Searching and downloading from Google Cloud is an experimental feature; -#' in case of bugs, report them at \url{https://github.com/ranghetti/sen2r/issues}. #' @param spatial_extent A valid spatial object object of class `sf`, #' `sfc` or `sfg` #' @param tile `string array` Sentinel-2 Tiles to be considered string (5-length character) @@ -44,26 +25,22 @@ #' product #' - "L1C": list available level-1C products #' - "L2A": list available level-2A products -#' @param server The servers where archives are searched. -#' Available options are `"scihub"` (ESA Sentinel Hub) and `"gcloud"` -#' (Google Cloud). -#' Default is `"scihub"`, meaning that only ESA Sentinel Hub is considered. -#' In case of multiple values, they are used in order of priority. -#' If `availability = "check"`, products on LTA are always left as last choice. +#' @param server (deprecate) Character vector of length 1, with the names of +#' the servers on which SAFE archives are searched. +#' Currently, only `"gcloud"` (Google Cloud) is supported. +#' Old `"scihub"` (ESA Sentinel Hub) can no more be used, since November 2023, +#' when the Copernicus Sentinel Data is no longer available and has been +#' replaced by the Copernicus Data Space Ecosystem. #' See also the section "Details". -#' @param apihub Path of the `apihub.txt` file containing credentials -#' of SciHub account. -#' If NA (default), the default location inside the package will be used. -#' @param service Character: it can be `"dhus"` or `"apihub"` (default), -#' in which cases the required service is forced instead that the one present -#' in the URLs passed through argument `s2_prodlist`. +#' @param apihub _deprecated_ +#' @param service _deprecated_ #' @param max_cloud Integer number (0-100) containing the maximum cloud #' level of the tiles to be listed (default: no filter). #' @param availability Character argument, determining which products have #' to be returned: #' - `"online"` : only archive names already available for download are returned; #' - `"lta"`: only archive names stored in the -#' [Long Term Archive](https://scihub.copernicus.eu/userguide/LongTermArchive) +#' Long Term Archive #' are returned; #' - `"check"`: all archive names are returned, checking if they are #' available or not for download (see "Value" to know @@ -105,10 +82,10 @@ #' \donttest{ #' #' 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")) +#' time_window <- as.Date(c("2020-08-01", "2020-08-11")) #' #' # Full-period list -#' if (is_scihub_configured()) { +#' if (is_gcloud_configured()) { #' example_s2_list <- s2_list( #' spatial_extent = pos, #' tile = "32TNR", @@ -123,7 +100,7 @@ #' safe_getMetadata(example_s2_list, "sensing_datetime") #' #' # Seasonal-period list -#' if (is_scihub_configured()) { +#' if (is_gcloud_configured()) { #' example_s2_list <- s2_list( #' spatial_extent = pos, #' tile = "32TNR", @@ -145,7 +122,7 @@ s2_list <- function(spatial_extent = NULL, time_interval = c(Sys.Date() - 10, Sys.Date()), time_period = "full", # temporal parameters level = "auto", - server = "scihub", + server = "gcloud", apihub = NA, service = "apihub", max_cloud = 100, @@ -202,10 +179,10 @@ s2_list <- function(spatial_extent = NULL, time_interval <- as.Date(time_interval) } - if (anyNA(match(server, c("scihub", "gcloud", "s2cogs")))) { + if (anyNA(match(server, c("gcloud", "s2cogs")))) { print_message( type = "error", - "`server` must be \"gcloud\" or \"scihub\"" + "`server` must be \"gcloud\" (\"apihub\" is no longer available)." ) } diff --git a/R/s2_list_scihub.R b/R/s2_list_scihub.R index 0a6b96ce..7dc8da05 100644 --- a/R/s2_list_scihub.R +++ b/R/s2_list_scihub.R @@ -1,227 +1,6 @@ .s2_list_scihub <- function(spatial_extent, time_intervals, tile, orbit, max_cloud, apihub, service, availability, .s2tiles) { - - n_entries <- 1 - out_list <- list() - - # Check connection - if (!check_scihub_connection()) { print_message( type = "error", - "Impossible to reach the SciHub server ", - "(internet connection or SciHub may be down)." + "The SciHub server can no longer be accessed." ) - } - - # Get credentials - creds <- read_scihub_login(apihub) - if (!check_scihub_login(creds[1,1], creds[1,2])) { - print_message( - type = "error", - "SciHub credentials are not correct, ", - "please check them." - ) - } - - # S2 tiles - if (missing(.s2tiles)) {.s2tiles <- s2_tiles()} - - # # If spatial_extent is not point, simplify polygon if needed / convert to bbox - spatial_extent_or <- spatial_extent - if (length(st_cast(spatial_extent, "POINT")) >= 50) { - spatial_extent <- st_convex_hull(spatial_extent_or) - } - if (length(st_cast(spatial_extent, "POINT")) >= 50) { - spatial_extent <- st_as_sfc(sf::st_bbox(spatial_extent_or)) - print_message( - type = "warning", - "Input extent contains too many nodes, so its bounding box was used ", - "(a larger number of Sentinel-2 tiles could have been used); ", - "consider simplifying the extent manually." - ) - } - - # Prepare footprint - foot <- ifelse( - inherits(spatial_extent, "sfc_POINT"), - paste0('footprint:%22Intersects(', paste(as.numeric(sf::st_coordinates(spatial_extent)[c(2,1)]), collapse = ",%20"),')%22'), - paste0('footprint:%22Intersects(', sf::st_as_text(sf::st_geometry(spatial_extent)),')%22') - ) - - for (t_int in seq_len(nrow(time_intervals))) { - - rows <- 100 - start <- 0 - end_query <- FALSE - - while (!end_query) { - - query_string <- paste0( - 'https://',ifelse(service=='dhus','scihub','apihub'), - '.copernicus.eu/',service,'/search?', - 'start=', start, - '&rows=', rows, - '&q=', foot, - ' AND platformname:Sentinel-2', - ' AND beginposition:[', time_intervals[t_int,1], 'T00:00:00.000Z', - ' TO ', time_intervals[t_int,2], 'T23:59:59.000Z]', - ' AND cloudcoverpercentage:[0 TO ', max_cloud,']' - ) - query_string <- gsub(" ", "%20",query_string) - query_string <- gsub("\\[", "%5b",query_string) - query_string <- gsub("\\]", "%5d",query_string) - - times_429 <- 10 # if 429 "too many requests", retry up to 10 times - while (times_429 > 0) { - out_query <- RETRY( - verb = "GET", - url = query_string, - config = authenticate(creds[1,1], creds[1,2]) - ) - times_429 <-if (out_query$status_code != 429) {0} else {times_429 - 1} - } - - out_xml <- content(out_query, as = "parsed", encoding = "UTF-8") - out_xml_list <- xmlRoot(htmlTreeParse(out_xml, useInternalNodes = TRUE)) - out_xml_list <- out_xml_list[["body"]][["feed"]] - - - for (ll in which(names(out_xml_list)=="entry")) { - - in_entry <- strsplit(saveXML(out_xml_list[[ll]]), "\n") - - if (length(which(grepl("([^<]+).*$", "\\1", - in_entry[which(grepl("", in_entry))] - ) - - url <- gsub( - "^.*<link href=\"([^\"]+)\"/>.*$", "\\1", - in_entry[which(grepl("<link href=", in_entry))] - ) - - id_orbit <- sprintf("%03i", as.numeric( - gsub( - "^.*<int name=\"relativeorbitnumber\">([^<]+)</int>.*$", "\\1", - in_entry[which(grepl("\\\"relativeorbitnumber\\\"", in_entry))] - ) - )) - - footprint <- tryCatch( - st_as_sfc( - gsub( - "^.*<str name=\"footprint\">([^<]+)</str>.*$", "\\1", - in_entry[which(grepl("\\\"footprint\\\"", in_entry))] - ), - crs = 4326 - ), - error = function(e) {st_polygon()} - ) - - clouds <- as.numeric(gsub( - "^.*<double name=\"cloudcoverpercentage\">([^<]+)</double>.*$", "\\1", - in_entry[which(grepl("\\\"cloudcoverpercentage\\\"", in_entry))] - )) - - proc_level <- gsub( - "^.*<str name=\"processinglevel\">Level\\-([^<]+)</str>.*$", "\\1", - in_entry[which(grepl("\\\"processinglevel\\\"", in_entry))] - ) - - mission <- gsub( - "^.*<str name=\"platformserialidentifier\">Sentinel\\-([^<]+)</str>.*$", "\\1", - in_entry[which(grepl("\\\"platformserialidentifier\\\"", in_entry))] - ) - - id_tile <- gsub("^.+_T([0-9]{2}[A-Z]{3})_.+$", "\\1", title) - - sensing_datetime <- as.POSIXct( - gsub( - "^S2[AB]\\_MSIL[12][AC]\\_([0-9]{8}T[0-9]{6})\\_N[0-9]{4}\\_R[0-9]{3}\\_T[A-Z0-9]{5}\\_[0-9]{8}T[0-9]{6}$", - "\\1", - title - ), - format = "%Y%m%dT%H%M%S", tz = "UTC" - ) - - creation_datetime <- as.POSIXct( - gsub( - "^S2[AB]\\_MSIL[12][AC]\\_[0-9]{8}T[0-9]{6}\\_N[0-9]{4}\\_R[0-9]{3}\\_T[A-Z0-9]{5}\\_([0-9]{8}T[0-9]{6})$", - "\\1", - title - ), - format = "%Y%m%dT%H%M%S", tz = "UTC" - ) - - ingestion_datetime <- as.POSIXct( - gsub( - "^.*<date name=\"ingestiondate\">([0-9\\-]+)T([0-9\\:\\.]+)Z</date>.*$", - "\\1 \\2", - in_entry[which(grepl("name=\"ingestiondate\"", in_entry))] - ), - tz = "UTC" - ) - - uuid <- gsub( - "^.*<str name=\"uuid\">([^<]+)</str>.*$", "\\1", - in_entry[which(grepl("\\\"uuid\\\"", in_entry))] - ) - - - # print(paste0(title, ".SAFE")) - out_list[[n_entries]] <- data.frame( - name = paste0(title, ".SAFE"), - url = url, - mission = mission, - level = proc_level, - id_tile = id_tile, - id_orbit = id_orbit, - sensing_datetime = sensing_datetime, - ingestion_datetime = ingestion_datetime, - clouds = clouds, - footprint = st_as_text(footprint), - uuid = uuid, - stringsAsFactors = FALSE - ) - n_entries <- n_entries + 1 - } - } - - if (sum(names(out_xml_list)=="entry") != rows) { - end_query <- TRUE - } else { - start <- start + rows - } - } - - } - out_dt <- rbindlist(out_list) - - if (nrow(out_dt) == 0) {return(data.table())} - - # remove "wrong" tiles and orbits if needed - if (!is.null(tile)) { - out_dt <- out_dt[id_tile %in% tile,] - } else { - sel_s2tiles <- suppressMessages(suppressWarnings( - sf::st_intersection(.s2tiles, spatial_extent_or))) - out_dt <- out_dt[id_tile %in% unique(sel_s2tiles$tile_id),] - } - - if (!is.null(orbit)) { - out_dt <- out_dt[id_orbit %in% sprintf("%03i", as.numeric(orbit)),] - } - - # check online availability - out_dt$online <- if (availability == "ignore") { - NA - } else { - as.logical(safe_is_online(out_dt, verbose = FALSE, apihub = apihub)) - } - - out_dt - } diff --git a/R/s2_order.R b/R/s2_order.R index b41a9bf4..24eee18f 100644 --- a/R/s2_order.R +++ b/R/s2_order.R @@ -1,73 +1,13 @@ -#' @title Order S2 products. -#' @description The function orders S2 products from -#' [Long Term Archive](https://scihub.copernicus.eu/userguide/LongTermArchive). -#' @param s2_prodlist Named character: list of the products to be ordered, -#' in the format `safelist` (see [safelist-class]). -#' Alternatively, it can be the path of a JSON file exported by a previous -#' execution of [s2_order], in case the user wants, for any reason, to -#' resubmit the order. -#' @param export_prodlist Logical or character: if TRUE (default), -#' the list of ordered products is saved in a JSON text file, so to be easily -#' retrievable at a later stage with [safe_is_online] or [s2_download]; -#' if FALSE, no output files are generated. -#' It is also possible to pass the path of an existing folder in which the -#' JSON file will be saved (otherwise, a default path is used). -#' @param delay Numeric: time frame (in seconds) to leave between two -#' consecutive orders. Default is 0.5 seconds: use a higher value if you -#' encountered errors (i.e. not all the products were correctly ordered). -#' @param apihub Path of the `apihub.txt` file containing credentials -#' of SciHub account. -#' If NA (default), the default location inside the package will be used. -#' @param service Character: it can be `"dhus"` or `"apihub"`, in which cases -#' the required service is forced instead that the one present in the URLs -#' passed through argument `s2_prodlist`. -#' If NA (default), the service present in the URLs is maintained. -#' @param reorder Logical: If TRUE, and a json file exported by s2_order -#' is passed as argument to the function, try to order again also -#' the `"available"` and `"ordered"` S2 datasets. -#' Otherwise, only order the `"notordered"` ones. -#' @return A named vector, containing the subset of `s2_prodlist` elements -#' which were ordered. -#' Moreover, the vector includes the following attributes: -#' - `"available"` with the elements of `s2_prodlist` which were already -#' available for download, -#' - `"notordered"` with the elements of `s2_prodlist` which were not ordered -#' for any reasons, -#' - `"path"` (only if argument `export_prodlist` is not FALSE) with the path -#' of the json file in which the list of the products (ordered, available -#' and not ordered) was saved (if `export_prodlist = TRUE`). -#' -#' @author Luigi Ranghetti, phD (2019) -#' @author Lorenzo Busetto, phD (2020) -#' @references 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. -#' \doi{10.1016/j.cageo.2020.104473}, URL: \url{https://sen2r.ranghetti.info/}. -#' @note License: GPL 3.0 -#' @importFrom httr RETRY authenticate -#' @importFrom foreach foreach "%do%" -#' @importFrom jsonlite toJSON +#' @title Order S2 products (deprecated). +#' @description This function is deprecated and will be removed. +#' @param s2_prodlist deprecated +#' @param export_prodlist deprecated +#' @param delay deprecated +#' @param apihub deprecated +#' @param service deprecated +#' @param reorder deprecated +#' @return deprecated #' @export -#' -#' @examples -#' \dontrun{ -#' -#' # Generate the lists of products -#' pos <- sf::st_sfc(sf::st_point(c(-57.8815,-51.6954)), crs = 4326) -#' time_window <- as.Date(c("2019-10-21", "2019-11-20")) -#' list_safe <- s2_list(spatial_extent = pos, time_interval = time_window) -#' print(list_safe) -#' # (at the time the documentation was updated, this list was containing 6 -#' # archives already available online and 3 stored in the Long Term Archive) -#' -#' # Order the products -#' ordered_prods <- s2_order(list_safe) -#' -#' # Check in a second time if the product was made available -#' (order_path <- attr(ordered_prods, "path")) -#' safe_is_online(order_path) -#' -#' } s2_order <- function( s2_prodlist = NULL, @@ -77,15 +17,7 @@ s2_order <- function( service = NA, reorder = TRUE ) { - .s2_order( - s2_prodlist = s2_prodlist, - export_prodlist = export_prodlist, - delay = delay, - apihub = apihub, - service = service, - reorder = reorder, - .s2_availability = NULL - ) + return(invisible(NULL)) } # internal function, used internally in order not to repeat the check @@ -100,286 +32,5 @@ s2_order <- function( .s2_availability = NULL, .log_path = TRUE # TRUE to log all, FALSE to skip the path of the json ) { - - # to avoid NOTE on check - i <- NULL - - # convert input NA arguments in NULL - for (a in c("s2_prodlist", "export_prodlist", "apihub")) { - if (suppressWarnings(all(is.na(get(a))))) { - assign(a,NULL) - } - } - - # exit if empty - if (length(nn(s2_prodlist)) == 0) { - return(invisible(NULL)) - } - - # check export_prodlist - if (all(is.character(export_prodlist), length(export_prodlist) > 0)) { - if (!dir.exists(export_prodlist)) { - print_message( - type = "error", - "Argument 'export_prodlist' must be TRUE, FALSE or the path of an existing folder." - ) - } - } - - # check delay to be numeric - if (any(length(delay) == 0, !is.numeric(delay))) { - print_message( - type = "error", - "Argument 'delay' must be numeric" - ) - } - - # check input format - s2_prodlist <- as(s2_prodlist, "safelist") - # TODO add input checks - - # check the used service - if (!service %in% c("apihub", "dhus", NA)) { - print_message( - type = "error", - "Argument 'service' can be only \"apihub\" or \"dhus\"; ", - "leaving the input URLs as are." - ) - } else if (!is.na(service)) { - s2_prodlist <- gsub( - "^https://((scihub)|(apihub)).copernicus.eu/((apihub)|(dhus))/odata", - paste0("https://",ifelse(service=="dhus","scihub","apihub"), - ".copernicus.eu/",service,"/odata"), - s2_prodlist - ) - } - - # read credentials - s2_scihub <- s2_prodlist[grepl("^http.+Products\\(.+\\)/\\$value$", s2_prodlist)] - if (length(s2_scihub) > 0) { - creds <- read_scihub_login(apihub) - } - - # Split products to be downloaded from products to be ordered - - # Exclude products not from SciHub - s2_scihub <- s2_prodlist[grepl("^http.+Products\\(.+\\)/\\$value$", s2_prodlist)] - if (length(s2_scihub) < length(s2_prodlist)) { - print_message( - type = "message", - date = TRUE, - length(s2_prodlist) - length(s2_scihub), - " products are not from SciHub and will not considered." - ) - s2_prodlist <- s2_scihub - } - - # Check availability (order is never attempted for already online products) - s2_availability <- if (is.null(.s2_availability)) { - print_message( - type = "message", - date = TRUE, - "Check if products are already available for download..." - ) - safe_is_online(s2_prodlist, verbose = FALSE, apihub = apihub) - } else { - .s2_availability - } - - # If some products are already available, print a message - if (sum(s2_availability, na.rm = TRUE) > 0) { - print_message( - type = "message", - date = TRUE, - sum(s2_availability, na.rm = TRUE)," Sentinel-2 images are already online." - ) - } - - ## Order products stored in Long Term Archive - if (sum(!nn(s2_availability), na.rm = TRUE) > 0) { - print_message( - type = "message", - date = TRUE, - "Ordering ",sum(!nn(s2_availability), na.rm = TRUE)," Sentinel-2 images ", - "stored in the Long Term Archive..." - ) - } - if (!is.null(attr(s2_prodlist, "order_status")) & reorder == FALSE) { - # if the list includes the "order_status" attribute (meaning it was - # derived from a json file saved by s2_order), and reorder is FALSE, - # create a "old_order" variable contatining indices of already succesfull orders - # that in the meantime did not change to "available", - # and an "to_order" variable containing indices of datasets yet to be ordered - # (notordered and not available - could happen that another user requested the - # dataset in the meantime) - old_order <- which(!s2_availability & attr(s2_prodlist, "order_status") == "ordered") - to_order <- which(!s2_availability & attr(s2_prodlist, "order_status") != "ordered") - - } else { - to_order <- which(!nn(s2_availability)) - old_order <- NULL - } - - false_invalid_safe <- FALSE # initialise variables - quota_exceeded <- rep(TRUE, length(to_order)) - status_codes <- c() - i_cred <- 1 # creds record (in case of multiple SciHub credentials) - - # cycle along "to_order" to create a TRUE/FALSE array of succesfull orders - ordered_products <- foreach(i = seq_along(to_order), .combine = c) %do% { - # delay after previous order - if (i != 1) { - Sys.sleep(delay) - } - - # order products - # in case of user quota exceeded, repeat the order with different credentials - while (all(quota_exceeded[i], i_cred <= nrow(creds))) { - - times_429 <- 10 # if 429 "too many requests", retry up to 10 times - while (times_429 > 0) { - make_order <- RETRY( - verb = "GET", - url = as.character(s2_prodlist[i]), - config = authenticate(creds[i_cred,1], creds[i_cred,2]) - ) - times_429 <-if (make_order$status_code != 429) {0} else {times_429 - 1} - } - - # check if the order was successful - sel_ordered <- if (inherits(make_order, "response")) { - # save status code - status_codes[i] <- make_order$status_code - # check that user quota did not exceed - quota_exceeded[i] <- any(grepl( - "retrieval quota exceeded", - make_order$headers$`cause-message` - )) - if (quota_exceeded[i]) { - i_cred <- i_cred + 1 - if (i_cred <= nrow(creds)) { - print_message( - type = "message", - "Switching to SciHub record ",i_cred," at product ",i,".", - date = TRUE - ) - } - } - - # check that an invalid SAFE was not downloaded (#381) - if (make_order$status_code == 200) { - false_invalid_safe <- TRUE - make_order$content <- NULL; gc() - } - make_order$status_code == 202 - } else FALSE - - } # end of user quota WHILE cycle - - sel_ordered - - } - - # create a temporary array as long as s2_prodlist and "fill" it with logical - # depending on status: TRUE, if successfull order, FALSE for not - # succesfull order OR online dataset. - # In case we are working on resubmitting an order, and reorder is FALSE, recreate - # the "ordered_products" array, appending results of current run with "old_order" - - tempordered <- rep(FALSE, length(s2_prodlist)) - if (!is.null(old_order)) { - tempordered[sort(unique(c(to_order[ordered_products], old_order)))] <- TRUE - } else { - tempordered[to_order[ordered_products]] <- TRUE - } - ordered_products <- tempordered - notordered_products <- !ordered_products & !nn(s2_availability) - - out_list <- s2_prodlist[ordered_products] - attr(out_list, "available") <- s2_prodlist[s2_availability] - attr(out_list, "notordered") <- s2_prodlist[notordered_products] - - # remove order_status if present - attr(out_list, "order_status") <- NULL - - # export list_towrite, unless export_prodlist == FALSE - list_towrite <- list( - ordered = as.list(out_list), - available = as.list(attr(out_list, "available")), - notordered = as.list(attr(out_list, "notordered")) - ) - if (any(export_prodlist != FALSE) & length(list_towrite) > 0) { - order_time <- Sys.time() - - prodlist_dir <- if (is.logical(export_prodlist)) { - file.path(dirname(attr(load_binpaths(), "path")), "lta_orders") - } else { - export_prodlist - } - dir.create(prodlist_dir, showWarnings = FALSE) - prodlist_path <- file.path( - prodlist_dir, - strftime(order_time, format = "lta_%Y%m%d_%H%M%S.json") - ) - writeLines( - toJSON(as.list(list_towrite), pretty = TRUE), - prodlist_path - ) - attr(out_list, "path") <- prodlist_path - } - - # Issue processing messages / warnings - if (sum(ordered_products) > 0) { - print_message( - type = "message", - date = TRUE, - sum(ordered_products)," of ",sum(!nn(s2_availability), na.rm = TRUE)," Sentinel-2 images ", - "were correctly ordered. ", - if (.log_path == TRUE) {paste0( - "You can check at a later time if the ordered products are available online ", - "using the command:\n", - if (is.null(attr(out_list, "path"))) {paste0( - '\u00A0\u00A0safe_is_online(c(\n "',paste(out_list, collapse = '",\n "'),'"\n))' - )} else {paste0( - '\u00A0\u00A0safe_is_online("',attr(out_list, "path"),'")' - )}, - "\n" - )} - ) - } - - if (sum(notordered_products) > 0) { - - print_message( - type = "message", - date = TRUE, - sum(notordered_products)," of ",sum(!nn(s2_availability), na.rm = TRUE)," Sentinel-2 images ", - "were not correctly ordered ", - "(HTML status code: ",unique(paste(status_codes[status_codes!=202]), collapse = ", "),")", - if (any(quota_exceeded)) {paste0( - " because user '",creds[1,1],"' offline products retrieval quota exceeded. ", - "Please retry later, otherwise use different SciHub credentials ", - "(see ?write_scihub_login or set a specific value for argument \"apihub\")." - )} else if (false_invalid_safe) {paste0( - " because some invalid SAFE products were stored on the ESA API Hub. ", - "Please retry ordering them on DHUS ", - "(set argument 'service = \"dhus\"' in function s2_order())." - )} else { - "."#," Try using a higher value for the argument \"delay\"." - }, - if (.log_path == TRUE) {paste0( - " You can try ordering them at a later time ", - "using the command:\n", - if (is.null(attr(out_list, "path"))) {paste0( - '\u00A0\u00A0s2_order(c(\n "',paste(out_list, collapse = '",\n "'),'"\n))' - )} else {paste0( - '\u00A0\u00A0s2_order("',attr(out_list, "path"),'")' - )}, - "\n" - )} - ) - } - - return(out_list) - + return(invisible(NULL)) } diff --git a/R/safe_is_online.R b/R/safe_is_online.R index b01ed6bf..d9cf6ce6 100644 --- a/R/safe_is_online.R +++ b/R/safe_is_online.R @@ -1,47 +1,10 @@ -#' @title Check if SAFE is available for download -#' @description The function checks if the required SAFE archives are -#' available for download, or if they have to be ordered from the Long Term -#' Archive. -#' @param s2_prodlist Named character: list of the products to be checked, -#' in the format `safelist` (see [safelist-class]). -#' Alternatively, it can be the path of a JSON file exported by [s2_order]. -#' @param apihub Path of the "apihub.txt" file containing credentials -#' of SciHub account. -#' If NA (default), the default location inside the package will be used. -#' @param verbose Logical: if TRUE, provide processing messages summarising -#' how many of the SAFE archives in `s2_prodlist` are available online. -#' @return A logical vector of the same length and names of the SAFE products -#' passed with `s2_prodlist`, -#' in which each element is TRUE if the corresponding SAFE archive is -#' available for download, FALSE if it is not or NA in case of errors with -#' the SAFE url. -#' @author Luigi Ranghetti, phD (2019) -#' @author Lorenzo Busetto, phD (2020) -#' @references 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. -#' \doi{10.1016/j.cageo.2020.104473}, URL: \url{https://sen2r.ranghetti.info/}. -#' @note License: GPL 3.0 -#' @importFrom httr RETRY authenticate content -#' @importFrom jsonlite fromJSON +#' @title Check if SAFE is available for download (deprecated) +#' @description This function is deprecated and will be removed. +#' @param s2_prodlist deprecated +#' @param apihub deprecated +#' @param verbose deprecated +#' @return deprecated #' @export -#' -#' @examples -#' \donttest{ -#' if (is_scihub_configured()) { -#' -#' # Generate the lists of products -#' pos <- sf::st_sfc(sf::st_point(c(-57.8815,-51.6954)), crs = 4326) -#' time_window <- as.Date(c("2018-02-21", "2018-03-20")) -#' list_safe <- s2_list(spatial_extent = pos, time_interval = time_window) -#' # (at the time the documentation was written, this list was containing 5 -#' # archives already available online and 2 stored in the Long Term Archive) -#' -#' # Check for availability -#' safe_is_online(list_safe) -#' -#' } -#' } safe_is_online <- function(s2_prodlist = NULL, apihub = NA, verbose = TRUE) { @@ -68,51 +31,13 @@ safe_is_online <- function(s2_prodlist = NULL, apihub = NA, verbose = TRUE) { s2_prodlist ) - # read credentials - s2_scihub <- s2_prodlist[grepl("^http.+Products\\(.+\\)/\\$value$", s2_prodlist)] - if (length(s2_scihub) > 0) { - creds <- read_scihub_login(apihub) - } - # check for availability s2_availability <- sapply(s2_prodlist, function(p) { - if (grepl("^http.+Products\\(.+\\)/\\$value$", p)) { - tryCatch( - as.logical(content(RETRY( - verb = "GET", - url = gsub("\\$value$", "Online/$value", p), - config = httr::authenticate(creds[1,1], creds[1,2]) - ), as = "parsed", encoding = "UTF-8")), - error = function(e) { - print_message( - type = "error", - "Impossible to reach the SciHub server ", - "(internet connection or SciHub may be down)." - ) - NA - } - ) - } else if (grepl("^gs://gcp-public-data-sentinel-2", p)) {TRUE} else {NA} + TRUE }) names(s2_availability) <- names(s2_prodlist) - if (verbose == TRUE) { - if (all(s2_availability)) { - print_message( - type = "message", - date = FALSE, - "All ", length(s2_availability), " products are online." - ) - } else { - print_message( - type = "message", - date = FALSE, - length(which(s2_availability)), " out of ", - length(s2_availability), " products are online." - ) - } - } s2_availability } diff --git a/R/scihub_login.R b/R/scihub_login.R index f2ae8aee..7998bd5e 100644 --- a/R/scihub_login.R +++ b/R/scihub_login.R @@ -1,208 +1,53 @@ -#' @title Import / export / check SciHub username and password -#' @description -#' - `read_scihub_login()` reads the SciHub login information; -#' - `write_scihub_login()` saves new username and password; -#' - `check_scihub_login()` checks their validity; -#' - `is_scihub_configured()` check if SciHub credentials are configured. -#' -#' Login information is stored in a file `apihub.txt` inside the -#' ".sen2r" subfolder of the home directory. These functions allow reading -#' or writing this file, and editing it from the GUI. -#' In case file `apihub.txt` is missing, `read_scihub_login()` searches inside -#' the environmental variables `SCIHUB_USER` and `SCIHUB_PASSWORD`. -#' @param apihub_path Path of the file in which login information is saved. -#' If NA (default) it is automatically read from the package default location. -#' @param username SciHub username. -#' @param password SciHub password. -#' @param service Character: it can be `"dhus"` or `"apihub"` (default). -#' @return `read_scihub_login()` returns a matrix of credentials, -#' in which `username` is in the first column, `password` in the second. -#' @details Notice that new/recently updated SciHub credentials are recognised by API Hub -#' with a delay of about one week (see \url{https://scihub.copernicus.eu/twiki/do/view/SciHubWebPortal/APIHubDescription} for details). -#' -#' For this reason, newly created credentials can not immediately be used by `sen2r`, -#' and password edits on old credentials are not immediately recognised. -#' @author Luigi Ranghetti, phD (2019) -#' @references 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. -#' \doi{10.1016/j.cageo.2020.104473}, URL: \url{https://sen2r.ranghetti.info/}. -#' @note License: GPL 3.0 -#' -#' @examples -#' \donttest{ -#' is_scihub_configured() -#' } -#' \dontrun{ -#' check_scihub_connection() -#' check_scihub_login("username", "password") -#' write_scihub_login("username", "password") -#' read_scihub_login() -#' } +#' @title Import / export / check SciHub username and password (deprecated) +#' @description These functions are deprecated and will be removed. +#' @return deprecated #' @name read_scihub_login #' @rdname scihub_login +#' @param apihub_path deprecated +#' @param username deprecated +#' @param password deprecated +#' @param service deprecated #' @export - read_scihub_login <- function(apihub_path = NA) { - - # if apihub_path is not specified, - # retrieve from the current installation - if (any(c(is.na(apihub_path), length(nn(apihub_path))==0))) { - apihub_path <- file.path(dirname(attr(load_binpaths(), "path")), "apihub.txt") - attr(apihub_path, "default") <- TRUE - } else { - attr(apihub_path, "default") <- FALSE - } - - # return user and password - if (file.exists(apihub_path)) { - t(sapply(strsplit(readLines(apihub_path), " "), c)) - } else if (all(Sys.getenv("SCIHUB_USER") != "", Sys.getenv("SCIHUB_PASSWORD") != "")) { - matrix(c(Sys.getenv("SCIHUB_USER"), Sys.getenv("SCIHUB_PASSWORD")), ncol = 2) - } else { - # if apihub does not exists, return an error - print_message( - type="error", - "File apihub.txt with the SciHub credentials is missing. ", - if (attr(apihub_path, "default")) { - "Launch function write_scihub_login('<username>', '<password>') to create it." - } - ) - } - + matrix(c("",""), ncol = 2) } #' @name is_scihub_configured #' @rdname scihub_login -#' @return `is_scihub_configured()` returns TRUE if credentials can be -#' accessed, FALSE if not. #' @export - is_scihub_configured <- function() { - !inherits(try(read_scihub_login(), silent = TRUE), "try-error") + FALSE } - #' @name check_scihub_login -#' @return `check_scihub_login()` returns TRUE if credentials are valid, -#' FALSE elsewhere. -#' @importFrom httr RETRY authenticate handle -#' @author Lorenzo Busetto, phD (2019) #' @rdname scihub_login #' @export - check_scihub_login <- function(username, password, service = "apihub") { - if (!check_scihub_connection(service = service)) { - print_message( - type = "error", - "Impossible to reach the SciHub server ", - "(internet connection or SciHub may be down)." - ) - } - check_creds <- RETRY( - verb = "GET", - url = paste0("https://",ifelse(service=="dhus","scihub","apihub"), - ".copernicus.eu/",service,"/odata/v1"), - handle = handle(""), - config = authenticate(username, password) - ) - if (check_creds$status == "401") { - FALSE - } else { - TRUE - } + FALSE } #' @name check_scihub_connection -#' @return `check_scihub_connection()` returns TRUE if internet connection -#' is available and SciHub is accessible, FALSE otherwise. -#' @importFrom httr RETRY handle #' @rdname scihub_login #' @export check_scihub_connection <- function(service = "apihub") { - check_online <- try( - RETRY( - "GET", - url = paste0("https://",ifelse(service=="dhus","scihub","apihub"), - ".copernicus.eu/",service,"/"), - handle = handle("") - ) - ) - !inherits(check_online, "try-error") + FALSE } - #' @name write_scihub_login -#' @param check Logical: if TRUE (default), new credentials are checked -#' before writing them on `apihub_path` (if they are invalid, an error -#' is provided); -#' if FALSE, they are directly written. -#' @param append Logical: if TRUE, new credentials are added -#' to the ones existing within `apihub_path`; -#' if FALSE (default), `apihub_path` is replaced with the new ones. -#' @return `write_scihub_login()` returns NULL. #' @rdname scihub_login +#' @param check deprecated +#' @param append deprecated #' @export write_scihub_login <- function(username, password, apihub_path = NA, check = TRUE, append = FALSE) { - - # check credentials (if required) - if (check == TRUE) { - if (!check_scihub_login(username, password, service = "apihub")) { - if (!check_scihub_login(username, password, service = "dhus")) { - print_message( - type = "error", - "The provided credentials are not valid, ", - "so they will not be saved. " - ) - } else { - print_message( - type = "error", - "The provided credentials are not yet recognised by API Hub, ", - "although being valid on ESA SciHub; ", - "probably they were created recently. ", - "Please notice that new/recently updated SciHub credentials are recognised by API Hub ", - "with a delay of about one week. ", - "For this reason, newly created SciHub credentials can not immediately be used by sen2r", - "and password edits on old credentials are not immediately recognised." - ) - } - } - } - - # if apihub_path is not specified, - # retrieve from the current installation - if (any(c(is.na(apihub_path), length(nn(apihub_path))==0))) { - apihub_path <- file.path(dirname(attr(load_binpaths(), "path")), "apihub.txt") - dir.create(dirname(apihub_path), showWarnings = FALSE) - } - - # if append is required, read the old file - # in order to exclude duplicated entries and - # add the new credentials to the top instead that to the bottom - apihub <- matrix(c(username, password), nrow = 1) - if (append) { - apihub <- rbind(apihub, read_scihub_login(apihub_path)) - apihub <- apihub[!duplicated(apihub[,1]),] - apihub <- matrix(apihub, ncol = 2) - } - - # write credentials - writeLines(apply(apihub, 1, paste, collapse=" "), apihub_path) - + invisible(NULL) } - - - -# #' @name scihub_modal -# #' @rdname scihub_login - # write dialog content .scihub_modal <- function() { # nocov start diff --git a/R/sen2r.R b/R/sen2r.R index cd716696..cd58c52f 100644 --- a/R/sen2r.R +++ b/R/sen2r.R @@ -35,22 +35,18 @@ #' @param online (optional) Logical: TRUE (default) to search for available #' products on SciHub and/or Google Cloud (and download if needed); #' FALSE to work only with already downloaded SAFE products. -#' @param server (optional) Character vector of length 1 or 2, with the names of +#' @param server (deprecate) Character vector of length 1, with the names of #' the servers on which SAFE archives are searched. -#' Available options are `"scihub"` (ESA Sentinel Hub) and `"gcloud"` -#' (Google Cloud). -#' Default is `"scihub"`, meaning that only ESA Sentinel Hub is considered. -#' In case of multiple values, they are used in order of priority and -#' products on LTA are always left as last choice. +#' Currently, only `"gcloud"` (Google Cloud) is supported. +#' Old `"scihub"` (ESA Sentinel Hub) can no more be used, since November 2023, +#' when the Copernicus Sentinel Data is no longer available and has been +#' replaced by the Copernicus Data Space Ecosystem. #' See also the section "Details" of `s2_list()`. #' @param order_lta (optional) Logical: TRUE (default) to order products from #' the Long Term Archive if unavailable for direct download; FALSE to simply #' skip them (this option has effect only in online mode). #' It takes effect only if argument `server` includes `"scihub"`. -#' @param apihub Path of the text file containing credentials -#' of SciHub account. -#' If NA (default), the default location inside the package will be used. -#' It takes effect only if argument `server` includes `"scihub"`. +#' @param apihub _deprecated_ #' @param downloader (optional) Character value corresponding to the executable #' which should be used to download SAFE products. It could be one among #' `"builtin"` (default) and `"aria2"`. @@ -435,7 +431,7 @@ sen2r <- function(param_list = NULL, s2_levels = "l2a", sel_sensor = c("s2a","s2b"), online = TRUE, - server = "scihub", + server = "gcloud", order_lta = TRUE, apihub = NA, downloader = "builtin", diff --git a/R/zzz.R b/R/zzz.R index 1bee0c80..7cd16a97 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -8,6 +8,12 @@ "Welcome to sen2r. To use the package from a GUI, launch", " > sen2r()", "Documentation: https://sen2r.ranghetti.info", + "\nIMPORTANT: since November 2023, SAFE archives can no longer", + "be downloaded from the ESA Hub, so Google Cloud is the new default server.", + "To be able to search and download inputs: ", + "- install Google Cloud SDK (https://cloud.google.com/sdk/docs/install);", + "- configure sen2r to use Google Cloud SDK launching the function:", + " > check_gcloud()", # if (all( # Sys.info()["sysname"] %in% c("Windows", "Darwin"), # length(load_binpaths()) == 0 diff --git a/README.Rmd b/README.Rmd index 4a07eeb2..c95891f2 100644 --- a/README.Rmd +++ b/README.Rmd @@ -52,12 +52,18 @@ allows to: * mask cloudy pixels (using the Surface Classification Map as masking layer); * computing spectral indices and RGB images. -**New feature**: starting from version 1.5.0, -Sentinel-2 SAFE archives can be downloaded both from official -[Copernicus Open Access Hub](https://scihub.copernicus.eu/) or from -[Google Cloud Sentinel-2 bucket](https://cloud.google.com/storage/docs/public-datasets/sentinel-2) -(this option can be useful to bypass limitations of ESA Long Term Archive -retention time; refer to [this post](https://luigi.ranghetti.info/post/safe-gcloud/) for details). +**Important**: since November 2023, +Sentinel-2 SAFE archives can be searched and retrieved only from [Google Cloud Sentinel-2 bucket](https://cloud.google.com/storage/docs/public-datasets/sentinel-2); +to use it, **Google Cloud SDK must be installed** and configured following the +[official instructions](https://cloud.google.com/sdk/docs/install). +Refer to [this post](https://luigi.ranghetti.info/post/safe-gcloud/) for details +about how to install configure the required external dependency Google Cloud SDK. +Notice that this mode is not optimal (a modern STAC API approach should be used), +and searching products could be a very slow process. +Nevertheless, the replacement of the old official data source (ESA Hub) with the +new [Copernicus Data Space](https://dataspace.copernicus.eu/analyse/apis) is not +planned (this package is no longer actively maintained due to a career change of the developer). +Anyone who wants to help [can contribute](https://github.com/ranghetti/sen2r/issues/464)). Setting the execution of this processing chain is particularly easy using the <span style="color:#5793dd;vertical-align:top;font-size:90%;font-weight:normal;">sen</span><span style="color:#6a7077;vertical-align:baseline;font-size:115%;font-weight:bolder;">2</span><span style="color:#2f66d5;vertical-align:baseline;font-size:90%;font-weight:bold;">r</span> diff --git a/README.md b/README.md index 50db140e..4cbce452 100644 --- a/README.md +++ b/README.md @@ -53,13 +53,18 @@ allows to: layer); - computing spectral indices and RGB images. -**New feature**: starting from version 1.5.0, Sentinel-2 SAFE archives -can be downloaded both from official [Copernicus Open Access -Hub](https://scihub.copernicus.eu/) or from [Google Cloud Sentinel-2 -bucket](https://cloud.google.com/storage/docs/public-datasets/sentinel-2) -(this option can be useful to bypass limitations of ESA Long Term -Archive retention time; refer to [this -post](https://luigi.ranghetti.info/post/safe-gcloud/) for details). +**Important**: since November 2023, +Sentinel-2 SAFE archives can be searched and retrieved only from [Google Cloud Sentinel-2 bucket](https://cloud.google.com/storage/docs/public-datasets/sentinel-2); +to use it, **Google Cloud SDK must be installed** and configured following the +[official instructions](https://cloud.google.com/sdk/docs/install). +Refer to [this post](https://luigi.ranghetti.info/post/safe-gcloud/) for details +about how to install configure the required external dependency Google Cloud SDK. +Notice that this mode is not optimal (a modern STAC API approach should be used), +and searching products could be a very slow process. +Nevertheless, the replacement of the old official data source (ESA Hub) with the +new [Copernicus Data Space](https://dataspace.copernicus.eu/analyse/apis) is not +planned (this package is no longer actively maintained due to a career change of the developer). +Anyone who wants to help [can contribute](https://github.com/ranghetti/sen2r/issues/464)). Setting the execution of this processing chain is particularly easy using the <span diff --git a/cran-comments.md b/cran-comments.md index 7c6700b3..34030e82 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,36 +1,20 @@ -# sen2r v. 1.5.5 +# sen2r v. 1.6.0 ## Test environments -* [local installation] Windows 11, 64 bit, R 4.3.0: +* [local installation] Windows 11, 64 bit, R 4.3.2: There were no ERRORs, WARNINGs nor NOTEs. -* [local installation] Ubuntu 22.04.2, 64 bit, R 4.3.0: +* [local installation] Ubuntu 22.04.3, 64 bit, R 4.3.2: There were no ERRORs, WARNINGs nor NOTEs. * [macbuilder] macOS 13.3.1 (Mac mini Apple M1), 64 bit, R 4.3.0 - (`https://mac.r-project.org/macbuilder/results/1686841396-983eb296818f2468/`): + (`https://mac.r-project.org/macbuilder/results/1699566676-0896ab0a4ed31615/`): There were no ERRORs, WARNINGs nor NOTEs. * [devtools] `check_win_devel()` - (`https://win-builder.r-project.org/Fw686Vbi0d3z/`): + (`https://win-builder.r-project.org/iv0nUfgl4D12`): There were no ERRORs, WARNINGs nor NOTEs. * [devtools] `check_win_release()` - (`https://win-builder.r-project.org/dSW8wwg6b57y/`): + (`https://win-builder.r-project.org/6rXK4RskI2wd`): There were no ERRORs, WARNINGs nor NOTEs. * [devtools] `check_win_oldrelease()` - (`https://win-builder.r-project.org/T21XO5cyA9yj/`): + (`https://win-builder.r-project.org/KqRJiYhQh60e/`): There were no ERRORs, WARNINGs nor NOTEs. - -Additional issues (`M1mac`) were present: -``` -* checking tests ... - Running ‘spelling.R’ - Running ‘testthat.R’/Users/ripley/R/R-devel/bin/BATCH: line 60: 50463 Segmentation fault: 11 ${R_HOME}/bin/R -f ${in} ${opts} ${R_BATCH_OPTIONS} > ${out} 2>&1 - - ERROR -Running the tests in ‘tests/testthat.R’ failed. -``` -This submission should have managed this issue (I cannot be sure about that -because I was not able to reproduce this issue on any MacOS machines, see e.g. -`https://mac.r-project.org/macbuilder/results/1686841396-983eb296818f2468/` -and previous -`https://mac.r-project.org/macbuilder/results/1686565664-5f7f28746adca176/`, -which are not showing any errors.) diff --git a/docs/404.html b/docs/404.html index 854d942d..21263216 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/CODE-OF-CONDUCT.html b/docs/CODE-OF-CONDUCT.html index 2b5c8fef..aed84c05 100644 --- a/docs/CODE-OF-CONDUCT.html +++ b/docs/CODE-OF-CONDUCT.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/LICENSE.html b/docs/LICENSE.html index 3200a5c0..2d44a0b9 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/articles/docker.html b/docs/articles/docker.html index 29464e06..71df4093 100644 --- a/docs/articles/docker.html +++ b/docs/articles/docker.html @@ -33,7 +33,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/articles/index.html b/docs/articles/index.html index 08b89cad..c74e0360 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/articles/installation.html b/docs/articles/installation.html index 5d31aa69..488deeab 100644 --- a/docs/articles/installation.html +++ b/docs/articles/installation.html @@ -33,7 +33,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/articles/outstructure.html b/docs/articles/outstructure.html index a97f7c91..4a8932e9 100644 --- a/docs/articles/outstructure.html +++ b/docs/articles/outstructure.html @@ -33,7 +33,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/articles/sen2r_cmd.html b/docs/articles/sen2r_cmd.html index 75f93501..ca26e3b3 100644 --- a/docs/articles/sen2r_cmd.html +++ b/docs/articles/sen2r_cmd.html @@ -33,7 +33,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -286,7 +286,7 @@ <h2 id="load-processing-parameters-from-a-previously-saved-json-file">Load proce The processing chain can be re-launched with the command: sen2r("/home/lranghetti/.sen2r/proc_par/s2proc_20201127_172523.json")</code></pre> <p>This is for example particularly useful if a <code><a href="../reference/sen2r.html">sen2r()</a></code> -processing requires ordering images from the LTA archive (see <a href="https://scihub.copernicus.eu/userguide/LongTermArchive" class="external-link uri">https://scihub.copernicus.eu/userguide/LongTermArchive</a>).</p> +processing requires ordering images from the LTA archive.</p> <p>The user can in fact, in that case:</p> <ol style="list-style-type: decimal"> <li>set the processing parameters in the GUI and save them to JSON;</li> diff --git a/docs/articles/sen2r_gui.html b/docs/articles/sen2r_gui.html index a4692f6a..7824b72c 100644 --- a/docs/articles/sen2r_gui.html +++ b/docs/articles/sen2r_gui.html @@ -33,7 +33,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/authors.html b/docs/authors.html index cb4d217e..69e77876 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/index.html b/docs/index.html index 1993be77..fcdcdcc8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -40,7 +40,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -132,7 +132,7 @@ <li>mask cloudy pixels (using the Surface Classification Map as masking layer);</li> <li>computing spectral indices and RGB images.</li> </ul> -<p><strong>New feature</strong>: starting from version 1.5.0, Sentinel-2 SAFE archives can be downloaded both from official <a href="https://scihub.copernicus.eu/" class="external-link">Copernicus Open Access Hub</a> or from <a href="https://cloud.google.com/storage/docs/public-datasets/sentinel-2" class="external-link">Google Cloud Sentinel-2 bucket</a> (this option can be useful to bypass limitations of ESA Long Term Archive retention time; refer to <a href="https://luigi.ranghetti.info/post/safe-gcloud/" class="external-link">this post</a> for details).</p> +<p><strong>Important</strong>: since November 2023, Sentinel-2 SAFE archives can be searched and retrieved only from <a href="https://cloud.google.com/storage/docs/public-datasets/sentinel-2" class="external-link">Google Cloud Sentinel-2 bucket</a>; to use it, <strong>Google Cloud SDK must be installed</strong> and configured following the <a href="https://cloud.google.com/sdk/docs/install" class="external-link">official instructions</a>. Refer to <a href="https://luigi.ranghetti.info/post/safe-gcloud/" class="external-link">this post</a> for details about how to install configure the required external dependency Google Cloud SDK. Notice that this mode is not optimal (a modern STAC API approach should be used), and searching products could be a very slow process. Nevertheless, the replacement of the old official data source (ESA Hub) with the new <a href="https://dataspace.copernicus.eu/analyse/apis" class="external-link">Copernicus Data Space</a> is not planned (this package is no longer actively maintained due to a career change of the developer). Anyone who wants to help <a href="https://github.com/ranghetti/sen2r/issues/464" class="external-link">can contribute</a>).</p> <p>Setting the execution of this processing chain is particularly easy using the <span style="color:#5793dd;vertical-align:top;font-size:90%;font-weight:normal;">sen</span><span style="color:#6a7077;vertical-align:baseline;font-size:115%;font-weight:bolder;">2</span><span style="color:#2f66d5;vertical-align:baseline;font-size:90%;font-weight:bold;">r</span> GUI, which allows to set the parameters, to directly launch the main function or to save them in a JSON file which can be used to launch the processing at a later stage.</p> <p>The possibility to launch the processing with a set of parameters saved in a JSON file (or directly passed as function arguments) makes easy to build scripts to automatically update an archive of Sentinel-2 products. Specific processing operations (i.e. applying <strong>Sen2Cor</strong> on Level-1c SAFE products, merging adjacent tiles, computing spectral indices from existing products) can also be performed using intermediate functions (see <a href="#usage">usage</a>).</p> <p><a href="https://www.sciencedirect.com/science/article/pii/S0098300419304893" target="_blank" class="external-link"><img style="margin-right:20px;" src="data:image/gif;base64,R0lGODdheACgAPcAAAcECAgGCQkGCgkIDA0ICw0MDxYODz0AAC4HB0EAABQVE0MAAEQAAEUAABwTEkECBDgHB0kAAE8AAEcEBCIWFFQAADwLC0sGBlkAAB0bHicYFlsAAFgCAF4AAGAAAEkLCioaFy0dDVoGAFwGAGYAABwcNE4MDDAcGDQWImwAAG4AACIlHUcUDV4LAHAAAGUGBnACAk4TDnYAAGYMACUqHlMSEjYhG30AADIkIi0eO3QGBoIAAIMAAFcUFDsjG4YAAIMCAoQBBVIaFiUlRkAlHIwAADknI4UFBZIAAFkaGngMDC0zIzQtKEUnHZUAADAuMD4qJVwbG4cICJkAAW8UFFkeHkkpHT0wJkMtJXcUFE0rIKEBBpAMDV4jI1EtIDE9LaYCCEAzMVUvIakECXwaGmQlJaoFCkc1MKsFClkxITw5Pa8GC4sYGHMjI4giBV4yImUrKzlGMbcIDkw9OYMjI2c1Ir0KEF07Lr4KEGsyMr4LElFAO8ALEsMLE5QlJXsyMjxTRFtDPYgtLW45OU9MPElVMHg9I88NFtMOF9UOF3RCL9cOF4k0NHY9PT5aT9sPF6c1DElcQXZCQltYNYpCJOIQGIw7O5hCGp01NVViNXpFRecSGegTGmhSTExmTXxMTLs8DukbGm9VTaVGG5RDQ1hqQYhKSldrRVpiW4BQUIVXOaNDQ0d8RoZTU11yRmlrRXNfWJlMTO4qGmZ1PbhPGmJ2RKdMTJtTU19+RYlcXGl6QsZRGm18PIVsP2xrbo5dXZdaWqpTU259S4xiYnCBPnWDPNRVG4d6QXiGO6tbW5tlZfRKGpFra3Z3e4CLNuJaG6dlZYKPN3mIW7NtQ4yKOJ1sbKlqarNmZvBeG8V8F4yWMriCIpt2dvVgG/lgGvliG4KEiPpiHPxiHKl5eZCUXLJ5ecB7e5yMkbSDg6qLi7yEhJielbKXl8qPj6KplMOVk7qjo6yusrq0pcKtrc+qqri5vcy4uMXDx+C4uNjGxtzMzNPTzdnZ3ObZ2eXm6fj4+SH+IkNyZWF0ZWQgd2l0aCBFcXVpbGlicml1bSBNZWRpYVJpY2gALAAAAAB4AKAAAAj/ABkIHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKVGgiicmTKE9GiTCyZcgkCRbInElTJoMeLnN2TLLARJcukiQ1yiMpj9EIDXDqXIqRZ55Pn359kvQpVStmuZIkZcq1Is8uw4a1avVL6rBfrbQq7cr2IU9JYn8NS/UrV91hXba23cuQp4lWn1ql+sQtaNEoevkqPvj1U6O6jcS2aiQz8eLLAnlW+ZRkWORcn8QuYGAZ82KecC6QXhBlXJ5quUaXNs2X5+gkkhbk+ZWk1bCYs2m3tR2B2TA4cHKlazUvV961wmsvgDMWdKpc2JlxgxM8Ote3QvLA/5FUJU+jRkI+cYfunS3PYXlyNUqXJ9Ug+NzydG+vk2eDBkgBuMB/SJHGHn9MJRHFggw2yGAVJiDYVk0U1iThhRhmqOGGHHbo4YcghijiiCQKJwEDo5XI1AYYnJiiSwk0YEJMAy2QgAkN0GjjiwLtmMCPCaCYoo1AFgkkkT+ONtoHQfbIEo8HbSBliyiOtEBng3TxSS5BJgBaF/F1scAB8zQ5kAnsJDBOUMOY8EmTCTgmSTpCTWVYBIVRxWVQcAzT4w0p3ODBQlIWSqVINbxJUCsJMNNAjeQdUNiLC+TCTAKpCORlKnBmusClDCiqqZ8C1SBJbKTlwcABQdh4A6GFGv8aAZQafWqmpj8VlMAwBwzD5ZmNXJopinN1iiKoojKw60BeolplAkEkIIEMNiEU67USzNqRlwflcoBB3g5zgSQ9cilslalwqqmnyE7g7gTLCtRAK4PkEkWTC0gghwoJRPCqtdfG2mIDtFbELbi3ChTuAr8x8AFll6ZzXSsLqKssu0E6dl4jDQzTExzMyJRAFcyYsEAKLjRQBLQJE+QBiwEbeqJGu7bciGoEVdorAyZQxqitqczEgMWYHpuxmbtW2kVMKdZ8w2gRFJGCQiqkkIIHGMQ8pbYYIfdiAo00eqsQjezMsAm5AU2QJHC2YnSoSPspdgOqKvvbvwsEEW1CKvT/XTUJMMcsAcEXLRBUBAnUkAtOJgzTQ4yNcLozz+kEqfZAFwzzaC4R2hqqCaCbTOoH5s4oiZg3SJBACiRIAETLAvntt9UdZB3woRYNGFoeOibQZyoXjHajkp0n3hOKSVacCsEy1TCaCUYdFSGKNfxYr8k2khCE6tI+epDs4KdQe8wYcD0Rw/bkw04PNrIzz/ufKCtJ+vPAMdoF8OQDKgPM5JNPOiaDA2fe974FsGMQKSqK/NIHDzFdgIDzKEn6PlEwBoDvglezHbYIF5EF5CMXyupCPsKWj3fliB3puMCN5vEbePCOHZ9owAdtBId8VEES3OgCO951gH7sA2fMeBM8/9IBrx7YoxUmmMe7EtCPGjDAHgeK3QUxiLXbSaCCCFnAcl4UAbblw0ySSBOz8tGDfHzLBFVIh7N4Np4csoNZ/chDmfg3FTHKqxFJHNIXGRCF6RlkioAUnwYLNTgs6qofLUuADRcUAXZUoSBXGUY+UoE4MxoEh12Ax4KS0MMEwPBTn2igQUxgDwYlAB7wIFdCUgDIKdJukCy6YkMS4I8faYcbuBRhOnYJh3ngbCCNGMcCesAMfwjBkgXB5D52mY5OMiAfJghiBEfZD2b+qAvp2If3DHKDG7igaq0EH+BgiQEOJiQB9qhe9PKwjyTsUSDcoGCN0sExmcDBfdCxESbZ0f80RE7HHkHkRtBqtMIXPepTpDLIDha6gxvIAJzh/FvgpuQihYiQeV5ixwG+OJML9IN9KMrDF/0Jh3TUEKPpGMY+Z8JEy3EjH5/waBRElgp4JJFpPSgTw0B4EIb61KER7VsGr1U+LOpGfdywRzqUpQ9UpnKY9oAHN+YBj+ANwx4vdV4j/jcO/SUAk/1waksH0g8KRiGqSWWHjPzh1A+wY4j2SIhP59pQF7AynILE1kJ8l4fgocgENQgszhIQhUZUr0c90A+z4KAfqF2gAYENbE9edAGWhBCPKYqsExMAJtgJhK50BSpeAUdU84VEZDQxUmpjwjSaCIlpyRMaQkBL2xv/QNSVVZRZSySQBTeIIAJZCK4bhtvb3xJXuBIQgRtaEKQZCFe5vZ2BCKjQggrS9rq2vasrJ8oi03JkAcOlghuAO4PluiG65z0vFagQgfQG9wASaAEVGgAJEfQ2C37oLXNne13s3jZ8JIDlzDySrwZwYHAIlgAVRiCBBl+RwSJowYlEkIAWSJjBLWjADBzsYAkjpAhF4EF/a4vX8cnKkB5ygoqRAOIR01UG2gUwUWWpIhXbeMUhdjFDYRxIE0upkCW6sZCdwGId1zXGsyOtzFCcoSE7uQg/0LFtezzIwY3IyVgusot5PEUlb43JCNoClrNcBBd7E8lC9fEGBuwhM5hh/wxgEPOYhVzmEU8ZgwEWmHcz5OY+wznOc7ZxnfvL5fD5uEVgFk6fF+1mMAA60IOurV3xXOVt8pnRmH70mLV83ULLLgUzTvRlME3qN4Mh0EiIMnYnHb7c/lhDpS41nOWM5Rx3Gs2sG2RRLxTrWM96zpEO7X/TrEHc8UcOa+h1rDU95FQTGtd5JqSlo6MHPdgB2WhQdqZpPWRbg/bO4SutqLlS7XLjAdnaXjSc56xq2rL604dmM23KTW9rozvdph5zsOcKKEoLzJyYqbfA751uZgu53cLGdajnLXCBXzvbBef2jfftU08TO1byVkzDN/7wdI9B4jZ2dm2hXWnMHKIPG/9vuB3WAHFlG1zQ/t2unscdEkTY/OQpr/fKPQ7yFYvY3bhWM433YvOiI+IQOaf3zrV9aieLHLQWr5qrWQRwrhjd6IfgQ9KrLYeW+7rnTqD4QsEtOy93l+YcufrVs771pbu81jHHYMAyrhO1qx3pW+8607P8c9C+e3ZCn3ZOHmH3u7c92cr+OJYRPteo53rmTOHEJiqRiMIbHeU5P7e2Fe9kCTzgAe66wAU+ALoPmD50gK1BDFa/+sDGgAWwj73sZ2+B2tv+9gjIve4R0AZI+P73vueE8DlBecvfPO+I73XThQwBAzjf+RSggAZAAIITnMAG2LcBEYjQhCZY4ftaCL//F8ZP/vB///vdJ0L2sW996msg+s93/iXCQf/603/4wt8E4Y2PCMyn3O3LNmQWEH/RN33Wt37b133gN35i0IAO+IANOH5agH5NoH7ZZ30nAALvRwHxN3/2V3/4N3ybsAj8h3f/l3wBeGMDCH0ngAM4cAYuiAOE4AudYAQ2aARQkIM5eAdv0IM+6INpEIQROIFWkH7r134b+Hwe+IHhEIL4VwklmHSa53K0toLRZwT88A//4AsBEAACQAj1QANdOIZdCAB3UAdomIZqWAc9KIRi4AUTaITsl4FJaABL+IGy4IQiWHmWZ4IpJwebJ2cDGH0ggIVayIUCEAAGoAb5oAYB/1AABVACXhgAgbCGlpiGbdiAcViBF0iH8HeHH7gMeph/JGh8WpdzgJh4YmYBBViI8XAP7gAO7uAOLAAP93AO7aAGQ1ACQzAEiRgIhhCMwjiMhmCJb5AGb4h+FmgDSBh9oPiB2BAKo8gJpWh5p/iHgciKBngF4FAP+/AP/CAE+EAP/gAO4MAPjpADBjAABQAAikCM8CiManiMbxiHy9iMz2h/3+AN0qiHI8h/ebd5LGCAJ3AG/OAP9QAP/nAO5sAN+1AP4BAP+AAOXYAAT5ABikAJGrmRHAmPaoiMYmCPF0h9FJCPH8iPmzCK1Wh3fthweICCpcYC1Xd9c8AP93CQ8f+wD4TwD/XgD/wQD/7QD82AAlXQBhnJkUi5kcM4j2kAh0V4jxpokic5jZvAh4XXkgL3ksomkwc4B/oAi/7wD/GQAefgD0HZDlnoD4SQAyjwCRx5CZeQlEopj2j4BvX4lHMIAqPAhHwZDsuQknoIhcbnfxzndZjGAgdoA3PwD/5wD/fgk+uwAudQDzbpmOUYAADQCYqwmZzZmZ55B6AZmkF4BqRJmkZwBnO4l335gd/Qj3q4koaXdKkYk9eHfVoAC7gJDr4ADqgQB3GACr7QDMLpCzSQAcZJhsgZAAPwBZGQCQqQnMhZAAMAAHuQmqvJhKI4ioJpeYS5cTC5aDVQm9z/ZwVeIAadEAAKEAelUApxsAIF0IUCEJ/ymYiTqADPuQKlEAmRUAyF8JzzGZ+T+IjUeYGqeZ315w3TyAlWWXhtF2s9kH0KKAZpcJ4CQAOzcKEXGglfkAEDAJ/x6Z8CUADNYI7C4Aqe4AqZgJ7vOZ/oqYgCQJ0WeAIFaqDh0JrTuH/cuXXf6WYPin3eV54T2oVxUAzOwAu8gKGzUAqZ0J4rOp9LUAvNIA/goA21AAgGMAQ54IUD8J+JSJ1NkH0zaqA2qp1RmHR2UGo9Op5ekAZvcJ4BMAva4AzEQAxEGg3EcKHrWQqA8AU08JwBsAT1MAvtcA7C4AmoYAAAagBe+J9d/7gHnGgDYXqd35Cg23mVW6cHOyoEPmoFWiChdSAKXZgJxUCnRFoMR5qkgOAIeToLxKAKcbAO9SAPxbAO5PCq50AIW6qoAsCOLfqigfCokbqaf3mjZSqbpKapNvCjYvAGn9qFX3CkpTALvCCnxJCfgJCqkRAIr6ALxxAP9XAP5qBUswAI4NAM8eAOiCqfBUADOKAIBAAAgVCE2BesfMmPCQqbsWmmx6p9ysqsoBqfcZAJ6zkLxVAMpeAJkeAI1xoJs2ALveAJ+5AP9BAL+bAOvAAI9aAAHbqoH6qoywmv8gqpNEp/sgCY/sh/R3epmIppScCvWrCm/rqohVAMSaqfAv97rZ2gn55QCr3wCrUgDUC7DtIQDfqZn1+wpfIZAG8QC28QogIQr5yomt1wncM6jfiar0n3nS3LfZ3Kps2aiIXgCgcbCQirn4BACIBQtJGwnq8gDNKwDrVgsGt7sBnwn9BXAAZwBVCrfnv5DLQwtUz4DSVLqSjbfyqrtdrHqZ76tW86pwa7sztbC/lZtJkQCZPQC70gDfuwD0a6trXgCgXAqAoAiQoAslEbDn4LuPYXjQlKfIWLlSmHuESguGmAhv+qANqgDdFQDLqgC6XwuZIrtggbrbNwi7aQD/ywD+6wnrwQBwEqn1sqnQOwtyKbuvbnDYNLuIV7jTrKsi67uP//ugS6S6TO4Ay7iwzE4Aq6UAuSCwu/yw/oMA3ysA/vUI73IAwrkIiKwLG7KgQEML142bfGoLpN2Lr/+Loqa22ktrVN8LJeC6oBUAjOgAzRgAzlm7txOsG84Aq1oAqokA/vMA3lMA7xwA/18ArkEAlL4IV+Gp8dygRNAMCn2w3PQMCtW3wInMCzuWgMTJ4P3IWRUAt0qgu8UMHIgL6uwMHsSwzCcA20MA38sA7QMA2R0AsczAuFsAIDkL+7uqj2CbXzirqj8AyX8Az3p51Xa6kJvLKYpqlquqzNqgDrS8S8UKfIMKq8UAuR4ArS4A7rcA/l8A77cA+9cAyqMAuugAu9/1AKrlAIccAKgKAIW7qlphvGfnvJZ4x/k7egKNudAbmv2cd93rcHBbAEhDAJqPwKmYDKrEwIrrwO+WAPg5wP8uAOr4DKp7zKnTAJp8wEGXAFBqAAzje6e7CMfUsLxnAJxpDJxIejhZuya6zApYasXAuzoBoH6tu753vBcuoK6yC0o1oMupu7pjoLd0wMsTANn/sFf6AAVqCoZfirFnjMxlDP9FcJj5DGxodz0WwHhrloadqvboqeX1AKBUvBcloLp2CijnCiuoAMulvBenyiRkoNx6DHX2AAFGADQvCe7eioYEp/32AMyEx/z7x2nnyp/txrPZqstEuhSZsBcTCtQ//sCSe6s7pADOY7zklq00lMDMegC2LIpS9azOy3l98gDt0wwCZ90kfHvWusdywtnsoK04wq06XgtkC71eTQ1ePLyCZq08Tgu/w7nzB61Khbz6OwzOHwzPwczdUGgLGGmNkHgzYYCDiwAivwBHzd1zgQBgEg056w0NLQuwe9u7xAxLrgCUSqDVxM1APKjDKKuruQzGbc1lf51nBdbVOYbohZm0ywpcop2vNJALuqBgAa2GHLyJFbC0fcu7BNDClK1PEZ2dYnwJbd1Dd3clC92fb2z73GldiHA7tKCQagAVgwAMpNnx2K2ixaoYDgCbVgpASr0wU71grwnyD6onMg2Xr/ibrPUNls3Qe97dvlhm34tmhceX3EPQCqwIEEsKiBnQHv6dxcip5xMAuFALwFWwzIUAhlvQIAIJ8A0N3tN3/PsNbPwNbmrXIEl959NpAz2d7TkK7zWQD0vYi0DaBLsAQ2/dCJXQqhC6ACQAGiUAfwWeBIiOC0EN6X3eBxjd4QTmosQAHU14KJuA0aAIkCkK4DkAFLsAL2TdRjWABxoNhCzbF4awPA8N7ZreIaWJKUneAvDtd4cG1rsKMzvmgfIH3UR9whkA27moga8IiPqKhDvuGJqACloAsAft8UMIYvegYkKeULTtJVnnlXLgfIpuVbzmhwNojTR9wUkA1l3oUE/1AANiDfhBAGjv7okB7pjj4Jku7oVxAGTJDpmU7nn5jWu1DS4aBzfM7nWQ7cf+5rTTeI0kfcAUAABhAHauCbcfAESeu1l3jr9JiMytiJ7seBdoi6yAzqWc5yp17sv2ZjVkgBMbjsLniDOAgFQcimPYjrxwiSEliEjyrZnqiEaY3J4VDsxv5yTrCCGu3lMxnKoryADxjt7A6SQ0iBy+jdUd6BfQnuEP5nYKdi5F7u03fu6K6AnPqyDPiA5UeE2B7vGFjn8ffrfGnvvTYG+B5oNsYB7mIBp4d6oKNZPbDxHN8DCuIgDZIEmuV6rBcDt3d7EKB7bgAKLN/yLO/w6uZoW/+Q7xLfbYxnZC+GZkGVArAUMH/+ZzI/8zU/9CEndjhfcTq/8z1/LRDf9I729EE/8zRP9KgGZUevY1EXVH1jdjFD9V5P9Sx281dPYlrfSh2gNbHy9WrvdCDWd2OP9Ulf9jyP9oWy9mDPYlAm9gy1CqsQDJiwCsngB7bABn9vC5hgZA4V93J/9nQvJUOPBEgwZ5APYiD2Az/g9jqGCX/vB6tQ+JjgB5rPBmaW9WVfdksfMJCf+qoP+YRvC8EQDIbPBZbPA5j/9nMlYrRP+ztA+1KwUEewA1Lwc7nPA0Cl+KVfNacfMNfFBrBvC8mACcFwDZhg+EBg+yOWDOWgDsGQDM7/3w7BoA47cA2AjwnmwAZ+kAzQ8A7JcPxaP/eNXyi0Jfh9vwrXUP/BsArlAPuib/20tf3XYA4Ace0atGTqzO24tirZKnOkbkGDZu2dCooVLV7EiDEFCQwbPH4EGXLDDpIld/hJdi1ZMj87btw4ginYqmu2pJjEmVPnTh47jvw8sgOIlJdKUujQ4cKFDhgUU6hwAZWiDqcqnj6lGNWqxRQdOooE+zHnD1vJZpZkw2YHDza2bNXcGVcuSUzlBKorZ81SMjqkoKmzdk0dqXIQrZW7ZalcuVgRze1tHFGQNUFmk8WylozMxrCdxeLEhNIWSSmrgiW0hYlHsGS21M6N+/Kl/wwZLlLcxp1b927evX2T2PDVc9icrK8FVYdvVbvF/9qdNL2qpGzqtGkrdZr7YmM6ghDvJUMGGuEsey11z5g+fQoPGIQPD4ubohLIKWLlI1WwXL5+/4ClICgW3tQjkKJY6MjrnYhSYI0UdNCxBp1b4FmwwIxu8yA4+Da8iAxSYrEkFhiSKQcYaw605B8ybgGRFK0shFEQS8Lrri8dlCCFDjrIyIIMQcLDCsaNOtBwww0l6BDEvVKozBJoQrxFH3qgiSUWUqiC0cIUsiDFkg9JyfE8LwUBc0YhhyzSyA0xiGCBi8pLxhIXnATsLwTp0QcG1m4JMkv1UvBREDosOU8JQf9SsCSL7mSkQ6PbSPCASPfUpHQDCRpYgAGMMEsmBTCzENA+JawhQ4lbWOzTz/SUUCKLHl1d6sakStUhPCVIoOKFNnJ9gYr3Kj2yTQaGvcjTZG6h46m98oooHx3AjEUQVS20Ep1YblEnFnRIGIcRa24ZJp1qhhnHmlbm4WacasYZ5hNg1bw002GH9aBeEu6lIhZggKHi3hSUoGIjKgS5BRg+eSPh0XsXhrTeejuAmMgNfvmlGlOUqeYTZV5ohWIITRkn5F80gecXditOR+J3w5IgAgbknXdYkTBoxJQ2bmnDPZ03sEQTKj7JeeXOqMi1gxdGODrXXDGQgOmmmYbaPQnGhA6JaZdhjnlesDDQJOc/lDGFEUtM+cVXSxr5lergGPlFGUta+eOXcpTRRBlgTElb7aolaBlTrLOOOSyafcbgZmVybsPmvNXWuXHHFxfa6b4XoBxwywMXnApTTKn5F1NaseQFyPUmfWbJ+27g5b8vZ52B4TpqI3ZfRy+dUp35xr3lCCJInfLVWwc+6wZ2J7743I9HPnnll2de9+J5b6B334Onvnrrq/c9e+235/73678HP3zxxye/fPPPRz999ddnv333rw8IADs=" width="120" height="160" align="left"></a></p> diff --git a/docs/news/index.html b/docs/news/index.html index f82578de..6d20bc7d 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -91,6 +91,22 @@ <h1 data-toc-skip>Changelog <small></small></h1> <small>Source: <a href="https://github.com/ranghetti/sen2r/blob/HEAD/NEWS.md" class="external-link"><code>NEWS.md</code></a></small> </div> + <div class="section level2"> +<h2 class="page-header" data-toc-text="1.6.0" id="version-160">Version 1.6.0<small>2023-11-10</small><a class="anchor" aria-label="anchor" href="#version-160"></a></h2> +<div class="section level3"> +<h3 id="major-changes-1-6-0">Major changes<a class="anchor" aria-label="anchor" href="#major-changes-1-6-0"></a></h3> +<ul><li>Remove the possibility to search/download SAFE archives from ESA SciHub due to its discontinuation.</li> +<li>Set <code>"gcloud"</code> as the default SAFE server.</li> +<li>Begin voiding some functions related to ESA SciHub: <code><a href="../reference/s2_order.html">s2_order()</a></code>, <code><a href="../reference/safe_is_online.html">safe_is_online()</a></code>, <code>*_scihub_login()</code>, <code>"scihub"</code> methods in <code><a href="../reference/s2_list.html">s2_list()</a></code> and <code><a href="../reference/s2_download.html">s2_download()</a></code>.</li> +</ul></div> +<div class="section level3"> +<h3 id="documentation-1-6-0">Documentation<a class="anchor" aria-label="anchor" href="#documentation-1-6-0"></a></h3> +<ul><li> +<em>Partially</em> updating the documentation to reflect the above changes.</li> +<li>Remove old system requirements (<a href="https://github.com/ranghetti/sen2r/issues/463" class="external-link">#463</a>).</li> +<li>Remove old references to {rgdal}.</li> +</ul></div> +</div> <div class="section level2"> <h2 class="page-header" data-toc-text="1.5.5" id="version-155">Version 1.5.5<small>2023-06-16</small><a class="anchor" aria-label="anchor" href="#version-155"></a></h2> <div class="section level3"> @@ -554,7 +570,7 @@ <h3 id="new-functions--methods-1-2-1">New functions / methods<a class="anchor" a <ul><li> <code><a href="../reference/install_sen2cor.html">link_sen2cor()</a></code> can be used to link an existing Sen2Cor installation to sen2r;</li> <li> -<code><a href="https://rdrr.io/r/methods/as.html" class="external-link">as()</a></code> methods can be used to convert <code>safelist</code> from/to <code>character</code>, <code>data.frame</code> and <code>data.table</code> (as well as <code>as.character()',</code>as.data.frame()<code>and</code>as.data.table()` functions).</li> +<code>as()</code> methods can be used to convert <code>safelist</code> from/to <code>character</code>, <code>data.frame</code> and <code>data.table</code> (as well as <code>as.character()',</code>as.data.frame()<code>and</code>as.data.table()` functions).</li> </ul></div> <div class="section level3"> <h3 id="changes-in-default-values-1-2-1">Changes in default values<a class="anchor" aria-label="anchor" href="#changes-in-default-values-1-2-1"></a></h3> diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index aca37b88..1c1180ec 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -7,5 +7,5 @@ articles: outstructure: outstructure.html sen2r_cmd: sen2r_cmd.html sen2r_gui: sen2r_gui.html -last_built: 2023-10-19T14:27Z +last_built: 2023-11-09T21:25Z diff --git a/docs/reference/Rplot003.png b/docs/reference/Rplot003.png index d80f8195..1eba04f4 100644 Binary files a/docs/reference/Rplot003.png and b/docs/reference/Rplot003.png differ diff --git a/docs/reference/abs2rel.html b/docs/reference/abs2rel.html index f269061a..7252314a 100644 --- a/docs/reference/abs2rel.html +++ b/docs/reference/abs2rel.html @@ -20,7 +20,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -154,19 +154,19 @@ <h2>Author</h2> <h2>Examples</h2> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># the reference path</span></span></span> <span class="r-in"><span><span class="op">(</span><span class="va">ref_path</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.file.html" class="external-link">system.file</a></span><span class="op">(</span>package<span class="op">=</span><span class="st">"sf"</span><span class="op">)</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/sf"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/home/lranghetti/R/x86_64-pc-linux-gnu-library/4.3/sf"</span> <span class="r-in"><span><span class="co"># a path with a common parent with ref_path</span></span></span> <span class="r-in"><span><span class="op">(</span><span class="va">in_path_1</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.file.html" class="external-link">system.file</a></span><span class="op">(</span>package<span class="op">=</span><span class="st">"stars"</span><span class="op">)</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/stars"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/home/lranghetti/R/x86_64-pc-linux-gnu-library/4.3/stars"</span> <span class="r-in"><span><span class="co"># a path included in ref_path</span></span></span> <span class="r-in"><span><span class="op">(</span><span class="va">in_path_2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.file.html" class="external-link">system.file</a></span><span class="op">(</span><span class="st">"DESCRIPTION"</span>, package<span class="op">=</span><span class="st">"sf"</span><span class="op">)</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/sf/DESCRIPTION"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/home/lranghetti/R/x86_64-pc-linux-gnu-library/4.3/sf/DESCRIPTION"</span> <span class="r-in"><span><span class="co"># a path external to ref_path (in Linux)</span></span></span> <span class="r-in"><span><span class="op">(</span><span class="va">in_path_3</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/system.file.html" class="external-link">system.file</a></span><span class="op">(</span>package<span class="op">=</span><span class="st">"base"</span><span class="op">)</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/base"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/usr/lib/R/library/base"</span> <span class="r-in"><span><span class="co"># an unexisting path</span></span></span> <span class="r-in"><span><span class="op">(</span><span class="va">in_path_4</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/grep.html" class="external-link">gsub</a></span><span class="op">(</span><span class="st">"sf$"</span>,<span class="st">"unexistingpackage"</span>,<span class="va">ref_path</span><span class="op">)</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/unexistingpackage"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/home/lranghetti/R/x86_64-pc-linux-gnu-library/4.3/unexistingpackage"</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="fu">abs2rel</span><span class="op">(</span><span class="va">in_path_1</span>, <span class="va">ref_path</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [1] "../stars"</span> @@ -175,7 +175,7 @@ <h2>Examples</h2> <span class="r-out co"><span class="r-pr">#></span> [1] "./DESCRIPTION"</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/warning.html" class="external-link">suppressWarnings</a></span><span class="op">(</span><span class="fu">abs2rel</span><span class="op">(</span><span class="va">in_path_3</span>, <span class="va">ref_path</span><span class="op">)</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "../base"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/usr/lib/R/library/base"</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/warning.html" class="external-link">suppressWarnings</a></span><span class="op">(</span><span class="fu">abs2rel</span><span class="op">(</span><span class="va">in_path_4</span>, <span class="va">ref_path</span>, mustWork<span class="op">=</span><span class="cn">FALSE</span><span class="op">)</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [1] "../unexistingpackage"</span> diff --git a/docs/reference/add_rgb_image.html b/docs/reference/add_rgb_image.html index c9162fba..6921e045 100644 --- a/docs/reference/add_rgb_image.html +++ b/docs/reference/add_rgb_image.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/add_tile_suffix.html b/docs/reference/add_tile_suffix.html index 4609784f..b33939e4 100644 --- a/docs/reference/add_tile_suffix.html +++ b/docs/reference/add_tile_suffix.html @@ -21,7 +21,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/build_example_param_file.html b/docs/reference/build_example_param_file.html index bb34b77b..5dd5ec90 100644 --- a/docs/reference/build_example_param_file.html +++ b/docs/reference/build_example_param_file.html @@ -19,7 +19,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -145,7 +145,7 @@ <h2>Author</h2> <div id="ref-examples"> <h2>Examples</h2> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">build_example_param_file</span><span class="op">(</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:\\Users\\LUIGI~1.RAN\\AppData\\Local\\Temp\\RtmpkXRmAu\\file54d44aa3642f_sen2r_params.json"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/tmp/RtmpFvTjNK/file2b60eb3d185377_sen2r_params.json"</span> </code></pre></div> </div> </div> diff --git a/docs/reference/calcindex.html b/docs/reference/calcindex.html index ecbe6000..960502a7 100644 --- a/docs/reference/calcindex.html +++ b/docs/reference/calcindex.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/check_gcloud.html b/docs/reference/check_gcloud.html index 150e781c..75c5c089 100644 --- a/docs/reference/check_gcloud.html +++ b/docs/reference/check_gcloud.html @@ -24,7 +24,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/check_gdal.html b/docs/reference/check_gdal.html index 7a7001ee..d85f65a4 100644 --- a/docs/reference/check_gdal.html +++ b/docs/reference/check_gdal.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/check_gui_deps.html b/docs/reference/check_gui_deps.html index e35806d7..5e6174ac 100644 --- a/docs/reference/check_gui_deps.html +++ b/docs/reference/check_gui_deps.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/check_param_list.html b/docs/reference/check_param_list.html index 6adf0ba4..8f296c89 100644 --- a/docs/reference/check_param_list.html +++ b/docs/reference/check_param_list.html @@ -19,7 +19,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/check_sen2r_deps.html b/docs/reference/check_sen2r_deps.html index 54a38802..dc7d484f 100644 --- a/docs/reference/check_sen2r_deps.html +++ b/docs/reference/check_sen2r_deps.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/compute_s2_paths.html b/docs/reference/compute_s2_paths.html index d25ee13a..3998b7e4 100644 --- a/docs/reference/compute_s2_paths.html +++ b/docs/reference/compute_s2_paths.html @@ -26,7 +26,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/comsub.html b/docs/reference/comsub.html index c05eb575..47975a31 100644 --- a/docs/reference/comsub.html +++ b/docs/reference/comsub.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/create_indices_db.html b/docs/reference/create_indices_db.html index 256d5e39..5fc3e24c 100644 --- a/docs/reference/create_indices_db.html +++ b/docs/reference/create_indices_db.html @@ -23,7 +23,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/create_s2_dop.html b/docs/reference/create_s2_dop.html index 633c7ba3..678651ad 100644 --- a/docs/reference/create_s2_dop.html +++ b/docs/reference/create_s2_dop.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/expand_path.html b/docs/reference/expand_path.html index 56a6cbdf..62aa801e 100644 --- a/docs/reference/expand_path.html +++ b/docs/reference/expand_path.html @@ -22,7 +22,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/expect_equal_crs.html b/docs/reference/expect_equal_crs.html index f96d8b7c..521d7d80 100644 --- a/docs/reference/expect_equal_crs.html +++ b/docs/reference/expect_equal_crs.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/fix_envi_format.html b/docs/reference/fix_envi_format.html index 47792d32..5e3d5beb 100644 --- a/docs/reference/fix_envi_format.html +++ b/docs/reference/fix_envi_format.html @@ -26,7 +26,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/gdalUtil.html b/docs/reference/gdalUtil.html index 395b0492..502bed95 100644 --- a/docs/reference/gdalUtil.html +++ b/docs/reference/gdalUtil.html @@ -21,7 +21,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -195,7 +195,7 @@ <h2>Examples</h2> <span class="r-in"><span><span class="va">out0</span> <span class="op"><-</span> <span class="fu">gdalUtil</span><span class="op">(</span><span class="st">"info"</span>, <span class="va">examplename</span>, quiet <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/message.html" class="external-link">message</a></span><span class="op">(</span><span class="va">out0</span><span class="op">)</span></span></span> <span class="r-msg co"><span class="r-pr">#></span> Driver: GTiff/GeoTIFF</span> -<span class="r-msg co"><span class="r-pr">#></span> Files: C:\Users\luigi.ranghetti\AppData\Local\Programs\R\R-4.3.1\library\sen2r\extdata\out\S2A2A_20190723_022_Barbellino_BOA_10.tif</span> +<span class="r-msg co"><span class="r-pr">#></span> Files: /tmp/RtmpYYDtly/temp_libpath2b43a87fec8ad7/sen2r/extdata/out/S2A2A_20190723_022_Barbellino_BOA_10.tif</span> <span class="r-msg co"><span class="r-pr">#></span> Size is 24, 42</span> <span class="r-msg co"><span class="r-pr">#></span> Coordinate System is:</span> <span class="r-msg co"><span class="r-pr">#></span> PROJCRS["WGS 84 / UTM zone 32N",</span> @@ -232,7 +232,7 @@ <h2>Examples</h2> <span class="r-msg co"><span class="r-pr">#></span> ORDER[2],</span> <span class="r-msg co"><span class="r-pr">#></span> LENGTHUNIT["metre",1]],</span> <span class="r-msg co"><span class="r-pr">#></span> USAGE[</span> -<span class="r-msg co"><span class="r-pr">#></span> SCOPE["Navigation and medium accuracy spatial referencing."],</span> +<span class="r-msg co"><span class="r-pr">#></span> SCOPE["Engineering survey, topographic mapping."],</span> <span class="r-msg co"><span class="r-pr">#></span> AREA["Between 6°E and 12°E, northern hemisphere between equator and 84°N, onshore and offshore. Algeria. Austria. Cameroon. Denmark. Equatorial Guinea. France. Gabon. Germany. Italy. Libya. Liechtenstein. Monaco. Netherlands. Niger. Nigeria. Norway. Sao Tome and Principe. Svalbard. Sweden. Switzerland. Tunisia. Vatican City State."],</span> <span class="r-msg co"><span class="r-pr">#></span> BBOX[0,6,84,12]],</span> <span class="r-msg co"><span class="r-pr">#></span> ID["EPSG",32632]]</span> diff --git a/docs/reference/gdal_abs2rel_rel2abs.html b/docs/reference/gdal_abs2rel_rel2abs.html index 178d127f..d7ebd455 100644 --- a/docs/reference/gdal_abs2rel_rel2abs.html +++ b/docs/reference/gdal_abs2rel_rel2abs.html @@ -26,7 +26,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -173,7 +173,7 @@ <h2>Examples</h2> <span class="r-in"><span><span class="va">ex_vrt_content</span><span class="op">[</span><span class="va">ex_vrt_content</span> <span class="op">!=</span> <span class="va">abs_vrt_content</span><span class="op">]</span> <span class="co"># Original line</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [1] " <SourceDataset relativeToVRT=\"1\">S2A2A_20190723_022_Barbellino_RGB432B_10.tif</SourceDataset>"</span> <span class="r-in"><span><span class="va">abs_vrt_content</span><span class="op">[</span><span class="va">ex_vrt_content</span> <span class="op">!=</span> <span class="va">abs_vrt_content</span><span class="op">]</span> <span class="co"># Modified line</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] " <SourceDataset relativeToVRT=\"0\">C:\\Users\\luigi.ranghetti\\AppData\\Local\\Programs\\R\\R-4.3.1\\library\\sen2r\\extdata\\out\\S2A2A_20190723_022_Barbellino_RGB432B_10.tif</SourceDataset>"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] " <SourceDataset relativeToVRT=\"0\">/tmp/RtmpYYDtly/temp_libpath2b43a87fec8ad7/sen2r/extdata/out/S2A2A_20190723_022_Barbellino_RGB432B_10.tif</SourceDataset>"</span> <span class="r-in"><span><span class="va">rel_vrt_content</span><span class="op">[</span><span class="va">ex_vrt_content</span> <span class="op">!=</span> <span class="va">rel_vrt_content</span><span class="op">]</span> <span class="co"># No edits</span></span></span> <span class="r-out co"><span class="r-pr">#></span> character(0)</span> </code></pre></div> diff --git a/docs/reference/gdal_warp.html b/docs/reference/gdal_warp.html index fd5fc9f9..b998dcd1 100644 --- a/docs/reference/gdal_warp.html +++ b/docs/reference/gdal_warp.html @@ -20,7 +20,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/gdalwarp_grid.html b/docs/reference/gdalwarp_grid.html index 220f4233..6670bb9e 100644 --- a/docs/reference/gdalwarp_grid.html +++ b/docs/reference/gdalwarp_grid.html @@ -20,7 +20,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/gipp.html b/docs/reference/gipp.html index 15671364..5b69f24b 100644 --- a/docs/reference/gipp.html +++ b/docs/reference/gipp.html @@ -20,7 +20,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/gipp_init.html b/docs/reference/gipp_init.html index fdfa689e..8fd58240 100644 --- a/docs/reference/gipp_init.html +++ b/docs/reference/gipp_init.html @@ -19,7 +19,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/give_write_permission.html b/docs/reference/give_write_permission.html index 9d65a749..e3c95510 100644 --- a/docs/reference/give_write_permission.html +++ b/docs/reference/give_write_permission.html @@ -21,7 +21,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/ignorelist.html b/docs/reference/ignorelist.html index 27be4771..5cf6c547 100644 --- a/docs/reference/ignorelist.html +++ b/docs/reference/ignorelist.html @@ -19,7 +19,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/index.html b/docs/reference/index.html index 611f6701..8e746503 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -113,7 +113,7 @@ <h2 id="find-and-download-sentinel-products">Find and download Sentinel-2 produc </tr><tr><td> <p><code><a href="s2_order.html">s2_order()</a></code> </p> </td> - <td><p>Order S2 products.</p></td> + <td><p>Order S2 products (deprecated).</p></td> </tr><tr><td> <p><code><a href="sen2cor.html">sen2cor()</a></code> </p> </td> @@ -121,11 +121,11 @@ <h2 id="find-and-download-sentinel-products">Find and download Sentinel-2 produc </tr><tr><td> <p><code><a href="safe_is_online.html">safe_is_online()</a></code> </p> </td> - <td><p>Check if SAFE is available for download</p></td> + <td><p>Check if SAFE is available for download (deprecated)</p></td> </tr><tr><td> <p><code><a href="scihub_login.html">read_scihub_login()</a></code> <code><a href="scihub_login.html">is_scihub_configured()</a></code> <code><a href="scihub_login.html">check_scihub_login()</a></code> <code><a href="scihub_login.html">check_scihub_connection()</a></code> <code><a href="scihub_login.html">write_scihub_login()</a></code> </p> </td> - <td><p>Import / export / check SciHub username and password</p></td> + <td><p>Import / export / check SciHub username and password (deprecated)</p></td> </tr></tbody><tbody><tr><th colspan="2"> <h2 id="read-and-convert-safe-format">Read and convert SAFE format <a href="#read-and-convert-safe-format" class="anchor" aria-hidden="true"></a></h2> <p class="section-desc"></p> diff --git a/docs/reference/init_python.html b/docs/reference/init_python.html index 55fda29e..605145a8 100644 --- a/docs/reference/init_python.html +++ b/docs/reference/init_python.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/install_aria2.html b/docs/reference/install_aria2.html index 8c176ac1..31862d08 100644 --- a/docs/reference/install_aria2.html +++ b/docs/reference/install_aria2.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/install_sen2cor.html b/docs/reference/install_sen2cor.html index ce4627e6..628bdfe7 100644 --- a/docs/reference/install_sen2cor.html +++ b/docs/reference/install_sen2cor.html @@ -20,7 +20,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/list_indices.html b/docs/reference/list_indices.html index 792e06dc..372c836b 100644 --- a/docs/reference/list_indices.html +++ b/docs/reference/list_indices.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -248,7 +248,7 @@ <h2>Examples</h2> <span class="r-in"><span><span class="fu">list_indices</span><span class="op">(</span><span class="st">"s2_formula"</span>, <span class="st">"^MSAVI2$"</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [1] "(2*band_8+1-sqrt(power((2*band_8+1),2)-8*(band_8-band_4)))/(2)"</span> <span class="r-out co"><span class="r-pr">#></span> attr(,"pkg_version")</span> -<span class="r-out co"><span class="r-pr">#></span> [1] '1.5.4.9000'</span> +<span class="r-out co"><span class="r-pr">#></span> [1] ‘1.5.4.9000’</span> <span class="r-out co"><span class="r-pr">#></span> attr(,"creation_date")</span> <span class="r-out co"><span class="r-pr">#></span> [1] "2023-05-30 16:07:39 CEST"</span> <span class="r-in"><span></span></span> @@ -313,7 +313,7 @@ <h2>Examples</h2> <span class="r-out co"><span class="r-pr">#></span> [225] "NDVIre" "NDBI" "Rcc" "Gcc" </span> <span class="r-out co"><span class="r-pr">#></span> [229] "Bcc" "ExG" "NMDI" </span> <span class="r-out co"><span class="r-pr">#></span> attr(,"pkg_version")</span> -<span class="r-out co"><span class="r-pr">#></span> [1] '1.5.4.9000'</span> +<span class="r-out co"><span class="r-pr">#></span> [1] ‘1.5.4.9000’</span> <span class="r-out co"><span class="r-pr">#></span> attr(,"creation_date")</span> <span class="r-out co"><span class="r-pr">#></span> [1] "2023-05-30 16:07:39 CEST"</span> </code></pre></div> diff --git a/docs/reference/load_binpaths.html b/docs/reference/load_binpaths.html index 28b41fe0..1186916a 100644 --- a/docs/reference/load_binpaths.html +++ b/docs/reference/load_binpaths.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -141,22 +141,19 @@ <h2>Examples</h2> <span class="r-in"><span><span class="va">binpaths</span> <span class="op"><-</span> <span class="fu">load_binpaths</span><span class="op">(</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="va">binpaths</span></span></span> <span class="r-out co"><span class="r-pr">#></span> $gsutil</span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:\\Users\\LUIGI~1.RAN\\AppData\\Local\\Google\\CloudSDK\\GOOGLE~1\\bin\\gsutil"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/usr/lib/google-cloud-sdk/bin/gsutil"</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> $gdalinfo</span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:\\Users\\LUIGI~1.RAN\\AppData\\Local\\Programs\\OSGeo4W\\bin\\gdalinfo.exe"</span> -<span class="r-out co"><span class="r-pr">#></span> </span> -<span class="r-out co"><span class="r-pr">#></span> $python</span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:\\Users\\LUIGI~1.RAN\\AppData\\Local\\Programs\\OSGeo4W\\bin\\python.exe"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/usr/bin/gdalinfo"</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> $gdal_calc</span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:\\Users\\LUIGI~1.RAN\\AppData\\Local\\Programs\\OSGeo4W\\bin\\python.exe C:\\Users\\LUIGI~1.RAN\\AppData\\Local\\Programs\\OSGeo4W\\apps\\Python39\\Scripts\\GDAL_C~1.PY"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/usr/bin/gdal_calc.py"</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> $gdal_fillnodata</span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:\\Users\\LUIGI~1.RAN\\AppData\\Local\\Programs\\OSGeo4W\\bin\\python.exe C:\\Users\\LUIGI~1.RAN\\AppData\\Local\\Programs\\OSGeo4W\\apps\\Python39\\Scripts\\GDAL_F~1.PY"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/usr/bin/gdal_fillnodata.py"</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> attr(,"path")</span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:\\Users\\LUIGI~1.RAN\\DOCUME~1\\SEN2R~1/paths.json"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/home/lranghetti/.sen2r/paths.json"</span> <span class="r-in"><span><span class="co"># }</span></span></span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="cn">FALSE</span><span class="op">)</span> <span class="op">{</span></span></span> diff --git a/docs/reference/load_extent.html b/docs/reference/load_extent.html index 636f83fc..904ffeb0 100644 --- a/docs/reference/load_extent.html +++ b/docs/reference/load_extent.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/mountpoint.html b/docs/reference/mountpoint.html index d8b4fe5a..12774477 100644 --- a/docs/reference/mountpoint.html +++ b/docs/reference/mountpoint.html @@ -19,7 +19,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/nn.html b/docs/reference/nn.html index 1b664f00..9567fef5 100644 --- a/docs/reference/nn.html +++ b/docs/reference/nn.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/normalize_path.html b/docs/reference/normalize_path.html index 14f5f3fe..4e35a083 100644 --- a/docs/reference/normalize_path.html +++ b/docs/reference/normalize_path.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/path_check.html b/docs/reference/path_check.html index f2385e8b..842d8fa4 100644 --- a/docs/reference/path_check.html +++ b/docs/reference/path_check.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/print_message.html b/docs/reference/print_message.html index 7f4504b0..b9dce8b0 100644 --- a/docs/reference/print_message.html +++ b/docs/reference/print_message.html @@ -17,7 +17,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/projpar.html b/docs/reference/projpar.html index 66fe2028..3ed330cb 100644 --- a/docs/reference/projpar.html +++ b/docs/reference/projpar.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/raster2rgb.html b/docs/reference/raster2rgb.html index 9f6bbada..8d3ab87b 100644 --- a/docs/reference/raster2rgb.html +++ b/docs/reference/raster2rgb.html @@ -19,7 +19,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/raster_metadata.html b/docs/reference/raster_metadata.html index 22e11cbb..abf1f3b8 100644 --- a/docs/reference/raster_metadata.html +++ b/docs/reference/raster_metadata.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -153,9 +153,9 @@ <h2>Examples</h2> <span class="r-in"><span><span class="co"># \donttest{</span></span></span> <span class="r-in"><span><span class="co"># Return metadata as data.table</span></span></span> <span class="r-in"><span><span class="fu">raster_metadata</span><span class="op">(</span><span class="va">examplenames</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> path</span> -<span class="r-out co"><span class="r-pr">#></span> 1: C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/stars/tif/L7_ETMs.tif</span> -<span class="r-out co"><span class="r-pr">#></span> 2: C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/sen2r/extdata/out/S2A2A_20190723_022_Barbellino_BOA_10.tif</span> +<span class="r-out co"><span class="r-pr">#></span> path</span> +<span class="r-out co"><span class="r-pr">#></span> 1: /home/lranghetti/R/x86_64-pc-linux-gnu-library/4.3/stars/tif/L7_ETMs.tif</span> +<span class="r-out co"><span class="r-pr">#></span> 2: /tmp/RtmpYYDtly/temp_libpath2b43a87fec8ad7/sen2r/extdata/out/S2A2A_20190723_022_Barbellino_BOA_10.tif</span> <span class="r-out co"><span class="r-pr">#></span> valid res.x res.y size.x size.y nbands xmin ymin xmax ymax</span> <span class="r-out co"><span class="r-pr">#></span> 1: TRUE 28.5 28.5 349 352 6 288776.3 9110729 298722.8 9120761</span> <span class="r-out co"><span class="r-pr">#></span> 2: TRUE 10.0 10.0 24 42 11 580560.0 5101700 580800.0 5102120</span> @@ -166,9 +166,9 @@ <h2>Examples</h2> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># Return some metadata as data.table</span></span></span> <span class="r-in"><span><span class="fu">raster_metadata</span><span class="op">(</span><span class="va">examplenames</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"res"</span>, <span class="st">"size"</span>, <span class="st">"bbox"</span>, <span class="st">"outformat"</span><span class="op">)</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> path</span> -<span class="r-out co"><span class="r-pr">#></span> 1: C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/stars/tif/L7_ETMs.tif</span> -<span class="r-out co"><span class="r-pr">#></span> 2: C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/sen2r/extdata/out/S2A2A_20190723_022_Barbellino_BOA_10.tif</span> +<span class="r-out co"><span class="r-pr">#></span> path</span> +<span class="r-out co"><span class="r-pr">#></span> 1: /home/lranghetti/R/x86_64-pc-linux-gnu-library/4.3/stars/tif/L7_ETMs.tif</span> +<span class="r-out co"><span class="r-pr">#></span> 2: /tmp/RtmpYYDtly/temp_libpath2b43a87fec8ad7/sen2r/extdata/out/S2A2A_20190723_022_Barbellino_BOA_10.tif</span> <span class="r-out co"><span class="r-pr">#></span> valid res.x res.y size.x size.y xmin ymin xmax ymax outformat</span> <span class="r-out co"><span class="r-pr">#></span> 1: TRUE 28.5 28.5 349 352 288776.3 9110729 298722.8 9120761 GTiff</span> <span class="r-out co"><span class="r-pr">#></span> 2: TRUE 10.0 10.0 24 42 580560.0 5101700 580800.0 5102120 GTiff</span> @@ -177,7 +177,7 @@ <h2>Examples</h2> <span class="r-in"><span><span class="fu">raster_metadata</span><span class="op">(</span><span class="va">examplenames</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"res"</span>, <span class="st">"size"</span>, <span class="st">"bbox"</span>, <span class="st">"proj"</span><span class="op">)</span>, format <span class="op">=</span> <span class="st">"list"</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> [[1]]</span> <span class="r-out co"><span class="r-pr">#></span> [[1]]$path</span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/stars/tif/L7_ETMs.tif"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/home/lranghetti/R/x86_64-pc-linux-gnu-library/4.3/stars/tif/L7_ETMs.tif"</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> [[1]]$valid</span> <span class="r-out co"><span class="r-pr">#></span> [1] TRUE</span> @@ -240,7 +240,7 @@ <h2>Examples</h2> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> [[2]]</span> <span class="r-out co"><span class="r-pr">#></span> [[2]]$path</span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/sen2r/extdata/out/S2A2A_20190723_022_Barbellino_BOA_10.tif"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/tmp/RtmpYYDtly/temp_libpath2b43a87fec8ad7/sen2r/extdata/out/S2A2A_20190723_022_Barbellino_BOA_10.tif"</span> <span class="r-out co"><span class="r-pr">#></span> </span> <span class="r-out co"><span class="r-pr">#></span> [[2]]$valid</span> <span class="r-out co"><span class="r-pr">#></span> [1] TRUE</span> @@ -295,7 +295,7 @@ <h2>Examples</h2> <span class="r-out co"><span class="r-pr">#></span> ORDER[2],</span> <span class="r-out co"><span class="r-pr">#></span> LENGTHUNIT["metre",1]],</span> <span class="r-out co"><span class="r-pr">#></span> USAGE[</span> -<span class="r-out co"><span class="r-pr">#></span> SCOPE["Navigation and medium accuracy spatial referencing."],</span> +<span class="r-out co"><span class="r-pr">#></span> SCOPE["Engineering survey, topographic mapping."],</span> <span class="r-out co"><span class="r-pr">#></span> AREA["Between 6°E and 12°E, northern hemisphere between equator and 84°N, onshore and offshore. Algeria. Austria. Cameroon. Denmark. Equatorial Guinea. France. Gabon. Germany. Italy. Libya. Liechtenstein. Monaco. Netherlands. Niger. Nigeria. Norway. Sao Tome and Principe. Svalbard. Sweden. Switzerland. Tunisia. Vatican City State."],</span> <span class="r-out co"><span class="r-pr">#></span> BBOX[0,6,84,12]],</span> <span class="r-out co"><span class="r-pr">#></span> ID["EPSG",32632]]</span> @@ -308,11 +308,11 @@ <h2>Examples</h2> <span class="r-in"><span> <span class="fu"><a href="https://rdrr.io/r/base/system.file.html" class="external-link">system.file</a></span><span class="op">(</span><span class="st">"extdata/settings/gdal_formats.json"</span>, package<span class="op">=</span><span class="st">"sen2r"</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="op">)</span></span></span> <span class="r-in"><span><span class="fu">raster_metadata</span><span class="op">(</span><span class="va">examplenames</span>, <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"bbox"</span>, <span class="st">"proj"</span><span class="op">)</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> trying to read file: C:\Users\luigi.ranghetti\AppData\Local\Programs\R\R-4.3.1\library\sen2r\extdata\settings\gdal_formats.json</span> -<span class="r-out co"><span class="r-pr">#></span> path</span> -<span class="r-out co"><span class="r-pr">#></span> 1: C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/stars/tif/L7_ETMs.tif</span> -<span class="r-out co"><span class="r-pr">#></span> 2: C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/sen2r/extdata/out/S2A2A_20190723_022_Barbellino_BOA_10.tif</span> -<span class="r-out co"><span class="r-pr">#></span> 3: C:/Users/luigi.ranghetti/AppData/Local/Programs/R/R-4.3.1/library/sen2r/extdata/settings/gdal_formats.json</span> +<span class="r-out co"><span class="r-pr">#></span> trying to read file: /tmp/RtmpYYDtly/temp_libpath2b43a87fec8ad7/sen2r/extdata/settings/gdal_formats.json</span> +<span class="r-out co"><span class="r-pr">#></span> path</span> +<span class="r-out co"><span class="r-pr">#></span> 1: /home/lranghetti/R/x86_64-pc-linux-gnu-library/4.3/stars/tif/L7_ETMs.tif</span> +<span class="r-out co"><span class="r-pr">#></span> 2: /tmp/RtmpYYDtly/temp_libpath2b43a87fec8ad7/sen2r/extdata/out/S2A2A_20190723_022_Barbellino_BOA_10.tif</span> +<span class="r-out co"><span class="r-pr">#></span> 3: /tmp/RtmpYYDtly/temp_libpath2b43a87fec8ad7/sen2r/extdata/settings/gdal_formats.json</span> <span class="r-out co"><span class="r-pr">#></span> valid xmin ymin xmax ymax proj</span> <span class="r-out co"><span class="r-pr">#></span> 1: TRUE 288776.3 9110729 298722.8 9120761 EPSG:31985</span> <span class="r-out co"><span class="r-pr">#></span> 2: TRUE 580560.0 5101700 580800.0 5102120 EPSG:32632</span> diff --git a/docs/reference/s2_angles.html b/docs/reference/s2_angles.html index 9ed900ca..4f50393b 100644 --- a/docs/reference/s2_angles.html +++ b/docs/reference/s2_angles.html @@ -20,7 +20,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/s2_calcindices.html b/docs/reference/s2_calcindices.html index 4cb3c901..8c3cfb1c 100644 --- a/docs/reference/s2_calcindices.html +++ b/docs/reference/s2_calcindices.html @@ -19,7 +19,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -292,10 +292,25 @@ <h2>Examples</h2> <span class="r-msg co"><span class="r-pr">#></span> Loading required package: sp</span> <span class="r-msg co"><span class="r-pr">#></span> Loading required package: abind</span> <span class="r-msg co"><span class="r-pr">#></span> Loading required package: sf</span> -<span class="r-msg co"><span class="r-pr">#></span> Linking to GEOS 3.11.2, GDAL 3.6.2, PROJ 9.2.0; sf_use_s2() is TRUE</span> -<span class="r-msg co"><span class="r-pr">#></span> [2023-10-19 16:28:01] Computing index EVI on date 2019-07-23...</span> +<span class="r-msg co"><span class="r-pr">#></span> Linking to GEOS 3.10.2, GDAL 3.4.3, PROJ 8.2.1; sf_use_s2() is TRUE</span> +<span class="r-msg co"><span class="r-pr">#></span> [2023-11-09 22:26:19] Computing index EVI on date 2019-07-23...</span> +<span class="r-msg co"><span class="r-pr">#></span> Please note that rgdal will be retired during October 2023,</span> +<span class="r-msg co"><span class="r-pr">#></span> plan transition to sf/stars/terra functions using GDAL and PROJ</span> +<span class="r-msg co"><span class="r-pr">#></span> at your earliest convenience.</span> +<span class="r-msg co"><span class="r-pr">#></span> See https://r-spatial.org/r/2023/05/15/evolution4.html and https://github.com/r-spatial/evolution</span> +<span class="r-msg co"><span class="r-pr">#></span> rgdal: version: 1.6-7, (SVN revision 1203)</span> +<span class="r-msg co"><span class="r-pr">#></span> Geospatial Data Abstraction Library extensions to R successfully loaded</span> +<span class="r-msg co"><span class="r-pr">#></span> Loaded GDAL runtime: GDAL 3.4.3, released 2022/04/22</span> +<span class="r-msg co"><span class="r-pr">#></span> Path to GDAL shared files: /usr/share/gdal</span> +<span class="r-msg co"><span class="r-pr">#></span> GDAL binary built with GEOS: TRUE </span> +<span class="r-msg co"><span class="r-pr">#></span> Loaded PROJ runtime: Rel. 8.2.1, January 1st, 2022, [PJ_VERSION: 821]</span> +<span class="r-msg co"><span class="r-pr">#></span> Path to PROJ shared files: /home/lranghetti/.local/share/proj:/usr/share/proj</span> +<span class="r-msg co"><span class="r-pr">#></span> PROJ CDN enabled: FALSE</span> +<span class="r-msg co"><span class="r-pr">#></span> Linking to sp version:1.6-1</span> +<span class="r-msg co"><span class="r-pr">#></span> To mute warnings of possible GDAL/OSR exportToProj4() degradation,</span> +<span class="r-msg co"><span class="r-pr">#></span> use options("rgdal_show_exportToProj4_warnings"="none") before loading sp or rgdal.</span> <span class="r-in"><span><span class="va">ex_out</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:\\Users\\luigi.ranghetti\\AppData\\Local\\Temp\\RtmpkXRmAu/S2A2A_20190723_022_Barbellino_EVI_10.tif"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/tmp/RtmpFvTjNK/S2A2A_20190723_022_Barbellino_EVI_10.tif"</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># Show output</span></span></span> <span class="r-in"><span><span class="va">oldpar</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/graphics/par.html" class="external-link">par</a></span><span class="op">(</span>mfrow <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">1</span>,<span class="fl">2</span><span class="op">)</span>, mar <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/rep.html" class="external-link">rep</a></span><span class="op">(</span><span class="fl">0</span>,<span class="fl">4</span><span class="op">)</span><span class="op">)</span></span></span> diff --git a/docs/reference/s2_defNA.html b/docs/reference/s2_defNA.html index 0e5c40e9..d5d15515 100644 --- a/docs/reference/s2_defNA.html +++ b/docs/reference/s2_defNA.html @@ -19,7 +19,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/s2_dop.html b/docs/reference/s2_dop.html index 3cc2b0b0..b84c64d0 100644 --- a/docs/reference/s2_dop.html +++ b/docs/reference/s2_dop.html @@ -26,7 +26,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -173,46 +173,46 @@ <h2>Examples</h2> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># All the passages in a cycle of 10 days over all the orbits</span></span></span> <span class="r-in"><span><span class="fu">s2_dop</span><span class="op">(</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> date mission orbit</span> -<span class="r-out co"><span class="r-pr">#></span> 1: 2023-10-19 2A 002</span> -<span class="r-out co"><span class="r-pr">#></span> 2: 2023-10-19 2A 003</span> -<span class="r-out co"><span class="r-pr">#></span> 3: 2023-10-19 2A 004</span> -<span class="r-out co"><span class="r-pr">#></span> 4: 2023-10-19 2A 005</span> -<span class="r-out co"><span class="r-pr">#></span> 5: 2023-10-19 2A 006</span> +<span class="r-out co"><span class="r-pr">#></span> 1: 2023-11-09 2A 016</span> +<span class="r-out co"><span class="r-pr">#></span> 2: 2023-11-09 2A 017</span> +<span class="r-out co"><span class="r-pr">#></span> 3: 2023-11-09 2A 018</span> +<span class="r-out co"><span class="r-pr">#></span> 4: 2023-11-09 2A 019</span> +<span class="r-out co"><span class="r-pr">#></span> 5: 2023-11-09 2A 020</span> <span class="r-out co"><span class="r-pr">#></span> --- </span> -<span class="r-out co"><span class="r-pr">#></span> 282: 2023-10-28 2B 068</span> -<span class="r-out co"><span class="r-pr">#></span> 283: 2023-10-28 2B 069</span> -<span class="r-out co"><span class="r-pr">#></span> 284: 2023-10-28 2B 070</span> -<span class="r-out co"><span class="r-pr">#></span> 285: 2023-10-28 2B 071</span> -<span class="r-out co"><span class="r-pr">#></span> 286: 2023-10-28 2B 072</span> +<span class="r-out co"><span class="r-pr">#></span> 282: 2023-11-18 2B 083</span> +<span class="r-out co"><span class="r-pr">#></span> 283: 2023-11-18 2B 084</span> +<span class="r-out co"><span class="r-pr">#></span> 284: 2023-11-18 2B 085</span> +<span class="r-out co"><span class="r-pr">#></span> 285: 2023-11-18 2B 086</span> +<span class="r-out co"><span class="r-pr">#></span> 286: 2023-11-18 2B 087</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># The passages in the current month over two orbits</span></span></span> <span class="r-in"><span><span class="fu">s2_dop</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"022"</span>, <span class="st">"065"</span><span class="op">)</span>, <span class="st">"this month"</span><span class="op">)</span></span></span> <span class="r-out co"><span class="r-pr">#></span> date mission orbit</span> -<span class="r-out co"><span class="r-pr">#></span> 1: 2023-10-03 2A 065</span> -<span class="r-out co"><span class="r-pr">#></span> 2: 2023-10-05 2B 022</span> -<span class="r-out co"><span class="r-pr">#></span> 3: 2023-10-08 2B 065</span> -<span class="r-out co"><span class="r-pr">#></span> 4: 2023-10-10 2A 022</span> -<span class="r-out co"><span class="r-pr">#></span> 5: 2023-10-13 2A 065</span> -<span class="r-out co"><span class="r-pr">#></span> 6: 2023-10-15 2B 022</span> -<span class="r-out co"><span class="r-pr">#></span> 7: 2023-10-18 2B 065</span> -<span class="r-out co"><span class="r-pr">#></span> 8: 2023-10-20 2A 022</span> -<span class="r-out co"><span class="r-pr">#></span> 9: 2023-10-23 2A 065</span> -<span class="r-out co"><span class="r-pr">#></span> 10: 2023-10-25 2B 022</span> -<span class="r-out co"><span class="r-pr">#></span> 11: 2023-10-28 2B 065</span> -<span class="r-out co"><span class="r-pr">#></span> 12: 2023-10-30 2A 022</span> +<span class="r-out co"><span class="r-pr">#></span> 1: 2023-11-02 2A 065</span> +<span class="r-out co"><span class="r-pr">#></span> 2: 2023-11-04 2B 022</span> +<span class="r-out co"><span class="r-pr">#></span> 3: 2023-11-07 2B 065</span> +<span class="r-out co"><span class="r-pr">#></span> 4: 2023-11-09 2A 022</span> +<span class="r-out co"><span class="r-pr">#></span> 5: 2023-11-12 2A 065</span> +<span class="r-out co"><span class="r-pr">#></span> 6: 2023-11-14 2B 022</span> +<span class="r-out co"><span class="r-pr">#></span> 7: 2023-11-17 2B 065</span> +<span class="r-out co"><span class="r-pr">#></span> 8: 2023-11-19 2A 022</span> +<span class="r-out co"><span class="r-pr">#></span> 9: 2023-11-22 2A 065</span> +<span class="r-out co"><span class="r-pr">#></span> 10: 2023-11-24 2B 022</span> +<span class="r-out co"><span class="r-pr">#></span> 11: 2023-11-27 2B 065</span> +<span class="r-out co"><span class="r-pr">#></span> 12: 2023-11-29 2A 022</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># The dates in which Sentinel-2A will pass in next six weeks over one orbit</span></span></span> <span class="r-in"><span><span class="fu">s2_dop</span><span class="op">(</span><span class="st">"022"</span>, <span class="st">"6 weeks"</span>, mission <span class="op">=</span> <span class="st">"2A"</span><span class="op">)</span><span class="op">$</span><span class="va">date</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "2023-10-20" "2023-10-30" "2023-11-09" "2023-11-19"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "2023-11-09" "2023-11-19" "2023-11-29" "2023-12-09"</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># The date in which Sentinel-2A would be passed in the last 10 days over one orbit</span></span></span> <span class="r-in"><span><span class="fu">s2_dop</span><span class="op">(</span><span class="st">"022"</span>, <span class="st">"-10 days"</span>, mission <span class="op">=</span> <span class="st">"2A"</span><span class="op">)</span><span class="op">$</span><span class="va">date</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "2023-10-10"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "2023-11-09"</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># All the orbits covered today</span></span></span> <span class="r-in"><span><span class="fu">s2_dop</span><span class="op">(</span>timewindow <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html" class="external-link">Sys.Date</a></span><span class="op">(</span><span class="op">)</span>, mission <span class="op">=</span> <span class="st">"2B"</span><span class="op">)</span><span class="op">$</span><span class="va">orbit</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "073" "074" "075" "076" "077" "078" "079" "080" "081" "082" "083" "084"</span> -<span class="r-out co"><span class="r-pr">#></span> [13] "085" "086" "087"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "088" "089" "090" "091" "092" "093" "094" "095" "096" "097" "098" "099"</span> +<span class="r-out co"><span class="r-pr">#></span> [13] "100" "101"</span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># The passages in a fixed time window for one orbit</span></span></span> <span class="r-in"><span><span class="fu">s2_dop</span><span class="op">(</span><span class="fl">65</span>, <span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"2018-08-01"</span>, <span class="st">"2018-08-31"</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span></span> diff --git a/docs/reference/s2_download.html b/docs/reference/s2_download.html index 7f074f7c..005f9003 100644 --- a/docs/reference/s2_download.html +++ b/docs/reference/s2_download.html @@ -20,7 +20,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -197,9 +197,9 @@ <h2>Author</h2> <div id="ref-examples"> <h2>Examples</h2> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="cn">FALSE</span><span class="op">)</span> <span class="op">{</span></span></span> -<span class="r-in"><span><span class="va">single_s2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="st">"https://apihub.copernicus.eu/apihub/odata/v1/"</span>,</span></span> -<span class="r-in"><span> <span class="st">"Products(\'c7142722-42bf-4f93-b8c5-59fd1792c430\')/$value"</span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">single_s2</span><span class="op">)</span> <span class="op"><-</span> <span class="st">"S2A_MSIL1C_20170613T101031_N0205_R022_T32TQQ_20170613T101608.SAFE"</span></span></span> +<span class="r-in"><span><span class="va">single_s2</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/paste.html" class="external-link">paste0</a></span><span class="op">(</span><span class="st">"gs://gcp-public-data-sentinel-2/L2/tiles/32/T/NR/"</span>,</span></span> +<span class="r-in"><span> <span class="st">"S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE/"</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">single_s2</span><span class="op">)</span> <span class="op"><-</span> <span class="st">"S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE"</span></span></span> <span class="r-in"><span><span class="co"># (this is equivalent to:</span></span></span> <span class="r-in"><span><span class="co"># single_s2 <- example_s2_list[1]</span></span></span> <span class="r-in"><span><span class="co"># where example_s2_list is the output of the example of the</span></span></span> @@ -207,15 +207,7 @@ <h2>Examples</h2> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># Download the whole product</span></span></span> <span class="r-in"><span><span class="fu">s2_download</span><span class="op">(</span><span class="va">single_s2</span>, outdir<span class="op">=</span><span class="fu"><a href="https://rdrr.io/r/base/tempfile.html" class="external-link">tempdir</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span></span></span> -<span class="r-in"><span></span></span> -<span class="r-in"><span><span class="co">#' # Download the whole product - using aria2</span></span></span> -<span class="r-in"><span><span class="fu">s2_download</span><span class="op">(</span><span class="va">single_s2</span>, outdir<span class="op">=</span><span class="fu"><a href="https://rdrr.io/r/base/tempfile.html" class="external-link">tempdir</a></span><span class="op">(</span><span class="op">)</span>, downloader <span class="op">=</span> <span class="st">"aria2"</span><span class="op">)</span></span></span> -<span class="r-in"><span></span></span> -<span class="r-in"><span><span class="co"># Download more products, ordering the ones stored in the Long Term Archive</span></span></span> -<span class="r-in"><span><span class="va">pos</span> <span class="op"><-</span> <span class="fu">sf</span><span class="fu">::</span><span class="fu"><a href="https://r-spatial.github.io/sf/reference/sfc.html" class="external-link">st_sfc</a></span><span class="op">(</span><span class="fu">sf</span><span class="fu">::</span><span class="fu"><a href="https://r-spatial.github.io/sf/reference/st.html" class="external-link">st_point</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="op">-</span><span class="fl">57.8815</span>,<span class="op">-</span><span class="fl">51.6954</span><span class="op">)</span><span class="op">)</span>, crs <span class="op">=</span> <span class="fl">4326</span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="va">time_window</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"2018-02-21"</span>, <span class="st">"2018-03-20"</span><span class="op">)</span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="va">list_safe</span> <span class="op"><-</span> <span class="fu"><a href="s2_list.html">s2_list</a></span><span class="op">(</span>spatial_extent <span class="op">=</span> <span class="va">pos</span>, time_interval <span class="op">=</span> <span class="va">time_window</span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="fu">s2_download</span><span class="op">(</span><span class="va">list_safe</span>, outdir<span class="op">=</span><span class="fu"><a href="https://rdrr.io/r/base/tempfile.html" class="external-link">tempdir</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/file.info.html" class="external-link">file.info</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/file.path.html" class="external-link">file.path</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/tempfile.html" class="external-link">tempdir</a></span><span class="op">(</span><span class="op">)</span>,<span class="fu"><a href="https://rdrr.io/r/base/names.html" class="external-link">names</a></span><span class="op">(</span><span class="va">single_s2</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="op">}</span></span></span> </code></pre></div> </div> diff --git a/docs/reference/s2_gui.html b/docs/reference/s2_gui.html index a51b2daf..3cdf15f1 100644 --- a/docs/reference/s2_gui.html +++ b/docs/reference/s2_gui.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/s2_list.html b/docs/reference/s2_list.html index 30286311..f5243897 100644 --- a/docs/reference/s2_list.html +++ b/docs/reference/s2_list.html @@ -18,7 +18,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -106,7 +106,7 @@ <h1>Retrieve list of available S2 products.</h1> <span> time_interval <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html" class="external-link">Sys.Date</a></span><span class="op">(</span><span class="op">)</span> <span class="op">-</span> <span class="fl">10</span>, <span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html" class="external-link">Sys.Date</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span>,</span> <span> time_period <span class="op">=</span> <span class="st">"full"</span>,</span> <span> level <span class="op">=</span> <span class="st">"auto"</span>,</span> -<span> server <span class="op">=</span> <span class="st">"scihub"</span>,</span> +<span> server <span class="op">=</span> <span class="st">"gcloud"</span>,</span> <span> apihub <span class="op">=</span> <span class="cn">NA</span>,</span> <span> service <span class="op">=</span> <span class="st">"apihub"</span>,</span> <span> max_cloud <span class="op">=</span> <span class="fl">100</span>,</span> @@ -156,25 +156,21 @@ <h2>Arguments</h2> <dt>server</dt> -<dd><p>The servers where archives are searched. -Available options are <code>"scihub"</code> (ESA Sentinel Hub) and <code>"gcloud"</code> -(Google Cloud). -Default is <code>"scihub"</code>, meaning that only ESA Sentinel Hub is considered. -In case of multiple values, they are used in order of priority. -If <code>availability = "check"</code>, products on LTA are always left as last choice. +<dd><p>(deprecate) Character vector of length 1, with the names of +the servers on which SAFE archives are searched. +Currently, only <code>"gcloud"</code> (Google Cloud) is supported. +Old <code>"scihub"</code> (ESA Sentinel Hub) can no more be used, since November 2023, +when the Copernicus Sentinel Data is no longer available and has been +replaced by the Copernicus Data Space Ecosystem. See also the section "Details".</p></dd> <dt>apihub</dt> -<dd><p>Path of the <code>apihub.txt</code> file containing credentials -of SciHub account. -If NA (default), the default location inside the package will be used.</p></dd> +<dd><p><em>deprecated</em></p></dd> <dt>service</dt> -<dd><p>Character: it can be <code>"dhus"</code> or <code>"apihub"</code> (default), -in which cases the required service is forced instead that the one present -in the URLs passed through argument <code>s2_prodlist</code>.</p></dd> +<dd><p><em>deprecated</em></p></dd> <dt>max_cloud</dt> @@ -186,7 +182,7 @@ <h2>Arguments</h2> <dd><p>Character argument, determining which products have to be returned:</p><ul><li><p><code>"online"</code> : only archive names already available for download are returned;</p></li> <li><p><code>"lta"</code>: only archive names stored in the -<a href="https://scihub.copernicus.eu/userguide/LongTermArchive" class="external-link">Long Term Archive</a> +Long Term Archive are returned;</p></li> <li><p><code>"check"</code>: all archive names are returned, checking if they are available or not for download (see "Value" to know @@ -221,28 +217,11 @@ <h2>Value</h2> </div> <div id="details"> <h2>Details</h2> - <p>By default, SAFE archives are searched on ESA Sentinel Hub -(argument <code>server = "scihub"</code>), which is the faster and stable option. -After the reduction of the retention time to 30 days, -it is highly probable that products older then 30 days will not be found -online (see <a href="https://github.com/ranghetti/sen2r/issues/408" class="external-link">https://github.com/ranghetti/sen2r/issues/408</a>). -Moreover, after ordering them from Long Term Archive (LTA), in several cases -corrupted archives are obtained -(see <a href="https://github.com/ranghetti/sen2r/issues/406" class="external-link">https://github.com/ranghetti/sen2r/issues/406</a>, and refer to this -reference for details about the ESA LTA policy).</p> -<p>To avoid this problems, the research and download from Google Cloud was -recently implemented. -Users can set <code>server = "gcloud"</code> to use this data exclusively, or -<code>server = c("scihub", "gcloud"), availability = "check"</code> -to search for products available on SciHub first, or on Google Cloud -subsequently. -<strong>Important</strong>: to search and download from Google Cloud, Google Cloud SDK + <p><strong>Important</strong>: to search and download from Google Cloud, Google Cloud SDK must be installed and configured following the indications in <a href="https://cloud.google.com/sdk/docs/install" class="external-link">https://cloud.google.com/sdk/docs/install</a>. Notice also that querying Google Cloud can be very slow (while downloading them is generally faster than from SciHub).</p> -<p>Searching and downloading from Google Cloud is an experimental feature; -in case of bugs, report them at <a href="https://github.com/ranghetti/sen2r/issues" class="external-link">https://github.com/ranghetti/sen2r/issues</a>.</p> </div> <div id="note"> <h2>Note</h2> @@ -269,10 +248,10 @@ <h2>Examples</h2> <div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># \donttest{</span></span></span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="va">pos</span> <span class="op"><-</span> <span class="fu">sf</span><span class="fu">::</span><span class="fu"><a href="https://r-spatial.github.io/sf/reference/sfc.html" class="external-link">st_sfc</a></span><span class="op">(</span><span class="fu">sf</span><span class="fu">::</span><span class="fu"><a href="https://r-spatial.github.io/sf/reference/st.html" class="external-link">st_point</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="fl">9.85</span>,<span class="fl">45.81</span><span class="op">)</span><span class="op">)</span>, crs <span class="op">=</span> <span class="fl">4326</span><span class="op">)</span></span></span> -<span class="r-in"><span><span class="va">time_window</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"2016-05-01"</span>, <span class="st">"2017-07-30"</span><span class="op">)</span><span class="op">)</span></span></span> +<span class="r-in"><span><span class="va">time_window</span> <span class="op"><-</span> <span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"2020-08-01"</span>, <span class="st">"2020-08-11"</span><span class="op">)</span><span class="op">)</span></span></span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># Full-period list</span></span></span> -<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="scihub_login.html">is_scihub_configured</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="check_gcloud.html">is_gcloud_configured</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span> <span class="r-in"><span> <span class="va">example_s2_list</span> <span class="op"><-</span> <span class="fu">s2_list</span><span class="op">(</span></span></span> <span class="r-in"><span> spatial_extent <span class="op">=</span> <span class="va">pos</span>,</span></span> <span class="r-in"><span> tile <span class="op">=</span> <span class="st">"32TNR"</span>,</span></span> @@ -283,120 +262,25 @@ <h2>Examples</h2> <span class="r-in"><span> <span class="va">example_s2_list</span> <span class="op"><-</span> <span class="fu">as</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/character.html" class="external-link">character</a></span><span class="op">(</span><span class="op">)</span>, <span class="st">"safelist"</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="op">}</span></span></span> <span class="r-msg co"><span class="r-pr">#></span> Spherical geometry (s2) switched off</span> +<span class="r-msg co"><span class="r-pr">#></span> [2023-11-09 22:26:21] Querying Google Cloud (this can take a very long</span> +<span class="r-msg co"><span class="r-pr">#></span> time)...</span> <span class="r-msg co"><span class="r-pr">#></span> Spherical geometry (s2) switched on</span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">example_s2_list</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> A named vector with 47 SAFE archives.</span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160502T102032_N0201_R065_T32TNR_20160502T102027.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "https://apihub.copernicus.eu/apihub/odata/v1/Products('fde01d3f-8a0d-46cb-b65d-3e32eff93f1d')/$value" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160512T102032_N0202_R065_T32TNR_20160512T102029.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "https://apihub.copernicus.eu/apihub/odata/v1/Products('4b785773-ba94-49b2-ae81-9b4b08749f70')/$value" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160522T102032_N0202_R065_T32TNR_20160522T102029.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "https://apihub.copernicus.eu/apihub/odata/v1/Products('4abf7965-0b26-431b-8708-74de427c0112')/$value" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160611T102032_N0202_R065_T32TNR_20160611T102026.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "https://apihub.copernicus.eu/apihub/odata/v1/Products('68afcf6b-4ec6-48da-9b65-6cd41ff47a49')/$value" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160621T102022_N0204_R065_T32TNR_20160621T102024.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "https://apihub.copernicus.eu/apihub/odata/v1/Products('9bb6d780-c226-4f59-bad0-1daedfdce9d5')/$value" </span> -<span class="r-out co"><span class="r-pr">#></span> ...with 42 more elements.</span> +<span class="r-out co"><span class="r-pr">#></span> A named vector with 2 SAFE archives.</span> +<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "gs://gcp-public-data-sentinel-2/L2/tiles/32/T/NR/S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE/" </span> +<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20200809T102031_N0214_R065_T32TNR_20200809T130506.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "gs://gcp-public-data-sentinel-2/L2/tiles/32/T/NR/S2A_MSIL2A_20200809T102031_N0214_R065_T32TNR_20200809T130506.SAFE/" </span> <span class="r-out co"><span class="r-pr">#></span> The following attributes are included: mission, level, id_tile, id_orbit, sensing_datetime, ingestion_datetime, clouds, footprint, uuid, online.</span> <span class="r-in"><span><span class="co"># Print the dates of the retrieved products</span></span></span> <span class="r-in"><span><span class="fu"><a href="safe_getMetadata.html">safe_getMetadata</a></span><span class="op">(</span><span class="va">example_s2_list</span>, <span class="st">"sensing_datetime"</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160502T102032_N0201_R065_T32TNR_20160502T102027.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-05-02 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160512T102032_N0202_R065_T32TNR_20160512T102029.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-05-12 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160522T102032_N0202_R065_T32TNR_20160522T102029.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-05-22 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160611T102032_N0202_R065_T32TNR_20160611T102026.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-06-11 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160621T102022_N0204_R065_T32TNR_20160621T102024.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-06-21 10:20:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160701T102022_N0204_R065_T32TNR_20160701T102057.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-07-01 10:20:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160711T102032_N0204_R065_T32TNR_20160711T102030.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-07-11 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160721T102032_N0204_R065_T32TNR_20160721T102059.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-07-21 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160731T102032_N0204_R065_T32TNR_20160731T102107.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-07-31 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160810T102032_N0204_R065_T32TNR_20160810T102044.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-08-10 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160820T102022_N0204_R065_T32TNR_20160820T102112.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-08-20 10:20:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160830T102022_N0204_R065_T32TNR_20160830T102052.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-08-30 10:20:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160909T102022_N0204_R065_T32TNR_20160909T102108.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-09-09 10:20:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160919T102022_N0204_R065_T32TNR_20160919T102112.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-09-19 10:20:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160929T102022_N0204_R065_T32TNR_20160929T102344.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-09-29 10:20:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20161009T102022_N0204_R065_T32TNR_20161009T102522.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-10-09 10:20:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20161019T102032_N0204_R065_T32TNR_20161019T102353.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-10-19 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20161029T102132_N0204_R065_T32TNR_20161029T102445.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-10-29 10:21:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20161108T102232_N0204_R065_T32TNR_20161108T102425.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-11-08 10:22:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20161118T102322_N0204_R065_T32TNR_20161118T102318.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-11-18 10:23:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20161128T102352_N0204_R065_T32TNR_20161128T102354.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-11-28 10:23:52 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20161208T102422_N0204_R065_T32TNR_20161208T102418.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-12-08 10:24:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20161218T102432_N0204_R065_T32TNR_20161218T102606.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-12-18 10:24:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20161228T102432_N0204_R065_T32TNR_20161228T102428.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-12-28 10:24:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170107T102401_N0204_R065_T32TNR_20170107T102658.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-01-07 10:24:01 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170127T102301_N0204_R065_T32TNR_20170127T102258.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-01-27 10:23:01 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170206T102211_N0204_R065_T32TNR_20170206T102733.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-02-06 10:22:11 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170216T102101_N0204_R065_T32TNR_20170216T102204.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-02-16 10:21:01 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170226T102021_N0204_R065_T32TNR_20170226T102458.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-02-26 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170308T102021_N0204_R065_T32TNR_20170308T102514.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-03-08 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170318T102011_N0204_R065_T32TNR_20170318T102014.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-03-18 10:20:11 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170328T102021_N0204_R065_T32TNR_20170328T102018.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-03-28 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170407T102021_N0204_R065_T32TNR_20170407T102343.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-04-07 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170417T102021_N0204_R065_T32TNR_20170417T102334.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-04-17 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170427T102031_N0205_R065_T32TNR_20170427T102025.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-04-27 10:20:31 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170507T102031_N0205_R065_T32TNR_20170507T102319.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-05-07 10:20:31 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170517T102031_N0205_R065_T32TNR_20170517T102352.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-05-17 10:20:31 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170527T102031_N0205_R065_T32TNR_20170527T102301.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-05-27 10:20:31 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170606T102031_N0205_R065_T32TNR_20170606T102456.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-06-06 10:20:31 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170616T102021_N0205_R065_T32TNR_20170616T102331.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-06-16 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170626T102021_N0205_R065_T32TNR_20170626T102321.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-06-26 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL1C_20170701T102029_N0205_R065_T32TNR_20170701T102338.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-01 10:20:29 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170706T102021_N0205_R065_T32TNR_20170706T102301.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-06 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL1C_20170711T102029_N0205_R065_T32TNR_20170711T102309.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-11 10:20:29 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170716T102021_N0205_R065_T32TNR_20170716T102324.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-16 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL1C_20170721T102029_N0205_R065_T32TNR_20170721T102331.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-21 10:20:29 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170726T102021_N0205_R065_T32TNR_20170726T102259.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-26 10:20:21 UTC" </span> +<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "2020-08-04 10:15:59 UTC" </span> +<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20200809T102031_N0214_R065_T32TNR_20200809T130506.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "2020-08-09 10:20:31 UTC" </span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># Seasonal-period list</span></span></span> -<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="scihub_login.html">is_scihub_configured</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span> +<span class="r-in"><span><span class="kw">if</span> <span class="op">(</span><span class="fu"><a href="check_gcloud.html">is_gcloud_configured</a></span><span class="op">(</span><span class="op">)</span><span class="op">)</span> <span class="op">{</span></span></span> <span class="r-in"><span> <span class="va">example_s2_list</span> <span class="op"><-</span> <span class="fu">s2_list</span><span class="op">(</span></span></span> <span class="r-in"><span> spatial_extent <span class="op">=</span> <span class="va">pos</span>,</span></span> <span class="r-in"><span> tile <span class="op">=</span> <span class="st">"32TNR"</span>,</span></span> @@ -407,79 +291,34 @@ <h2>Examples</h2> <span class="r-in"><span> <span class="va">example_s2_list</span> <span class="op"><-</span> <span class="fu">as</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/character.html" class="external-link">character</a></span><span class="op">(</span><span class="op">)</span>, <span class="st">"safelist"</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="op">}</span></span></span> <span class="r-msg co"><span class="r-pr">#></span> Spherical geometry (s2) switched off</span> +<span class="r-msg co"><span class="r-pr">#></span> [2023-11-09 22:26:40] Querying Google Cloud (this can take a very long</span> +<span class="r-msg co"><span class="r-pr">#></span> time)...</span> <span class="r-msg co"><span class="r-pr">#></span> Spherical geometry (s2) switched on</span> <span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">example_s2_list</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> A named vector with 28 SAFE archives.</span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160502T102032_N0201_R065_T32TNR_20160502T102027.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "https://apihub.copernicus.eu/apihub/odata/v1/Products('fde01d3f-8a0d-46cb-b65d-3e32eff93f1d')/$value" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160509T101032_N0202_R022_T32TNR_20160509T101645.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "https://apihub.copernicus.eu/apihub/odata/v1/Products('abf24c65-2ff6-4c9a-9309-425425475d36')/$value" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160512T102032_N0202_R065_T32TNR_20160512T102029.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "https://apihub.copernicus.eu/apihub/odata/v1/Products('4b785773-ba94-49b2-ae81-9b4b08749f70')/$value" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160519T101032_N0202_R022_T32TNR_20160519T101312.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "https://apihub.copernicus.eu/apihub/odata/v1/Products('e1f000b8-e9c3-421b-88c2-08a9046d1a82')/$value" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160522T102032_N0202_R065_T32TNR_20160522T102029.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "https://apihub.copernicus.eu/apihub/odata/v1/Products('4abf7965-0b26-431b-8708-74de427c0112')/$value" </span> -<span class="r-out co"><span class="r-pr">#></span> ...with 23 more elements.</span> +<span class="r-out co"><span class="r-pr">#></span> A named vector with 5 SAFE archives.</span> +<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL2A_20200801T100559_N0214_R022_T32TNR_20200801T135302.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "gs://gcp-public-data-sentinel-2/L2/tiles/32/T/NR/S2B_MSIL2A_20200801T100559_N0214_R022_T32TNR_20200801T135302.SAFE/" </span> +<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "gs://gcp-public-data-sentinel-2/L2/tiles/32/T/NR/S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE/" </span> +<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20200806T101031_N0214_R022_T32TNR_20200806T115620.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "gs://gcp-public-data-sentinel-2/L2/tiles/32/T/NR/S2A_MSIL2A_20200806T101031_N0214_R022_T32TNR_20200806T115620.SAFE/" </span> +<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20200809T102031_N0214_R065_T32TNR_20200809T130506.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "gs://gcp-public-data-sentinel-2/L2/tiles/32/T/NR/S2A_MSIL2A_20200809T102031_N0214_R065_T32TNR_20200809T130506.SAFE/" </span> +<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL2A_20200811T100559_N0214_R022_T32TNR_20200811T133733.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "gs://gcp-public-data-sentinel-2/L2/tiles/32/T/NR/S2B_MSIL2A_20200811T100559_N0214_R022_T32TNR_20200811T133733.SAFE/" </span> <span class="r-out co"><span class="r-pr">#></span> The following attributes are included: mission, level, id_tile, id_orbit, sensing_datetime, ingestion_datetime, clouds, footprint, uuid, online.</span> <span class="r-in"><span><span class="co"># Print the dates of the retrieved products</span></span></span> <span class="r-in"><span><span class="fu"><a href="safe_getMetadata.html">safe_getMetadata</a></span><span class="op">(</span><span class="va">example_s2_list</span>, <span class="st">"sensing_datetime"</span><span class="op">)</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160502T102032_N0201_R065_T32TNR_20160502T102027.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-05-02 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160509T101032_N0202_R022_T32TNR_20160509T101645.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-05-09 10:10:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160512T102032_N0202_R065_T32TNR_20160512T102029.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-05-12 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160519T101032_N0202_R022_T32TNR_20160519T101312.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-05-19 10:10:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160522T102032_N0202_R065_T32TNR_20160522T102029.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-05-22 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160529T101032_N0202_R022_T32TNR_20160529T101030.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-05-29 10:10:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160608T101032_N0202_R022_T32TNR_20160608T101220.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-06-08 10:10:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160611T102032_N0202_R065_T32TNR_20160611T102026.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-06-11 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160618T101032_N0204_R022_T32TNR_20160618T101515.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-06-18 10:10:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160621T102022_N0204_R065_T32TNR_20160621T102024.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-06-21 10:20:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160628T101032_N0204_R022_T32TNR_20160628T101026.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-06-28 10:10:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160701T102022_N0204_R065_T32TNR_20160701T102057.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-07-01 10:20:22 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160708T101032_N0204_R022_T32TNR_20160708T101602.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-07-08 10:10:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160711T102032_N0204_R065_T32TNR_20160711T102030.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-07-11 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160718T101032_N0204_R022_T32TNR_20160718T101028.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-07-18 10:10:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20160721T102032_N0204_R065_T32TNR_20160721T102059.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2016-07-21 10:20:32 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170507T102031_N0205_R065_T32TNR_20170507T102319.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-05-07 10:20:31 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170517T102031_N0205_R065_T32TNR_20170517T102352.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-05-17 10:20:31 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170527T102031_N0205_R065_T32TNR_20170527T102301.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-05-27 10:20:31 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170606T102031_N0205_R065_T32TNR_20170606T102456.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-06-06 10:20:31 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170616T102021_N0205_R065_T32TNR_20170616T102331.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-06-16 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170626T102021_N0205_R065_T32TNR_20170626T102321.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-06-26 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL1C_20170701T102029_N0205_R065_T32TNR_20170701T102338.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-01 10:20:29 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170706T102021_N0205_R065_T32TNR_20170706T102301.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-06 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL1C_20170711T102029_N0205_R065_T32TNR_20170711T102309.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-11 10:20:29 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL1C_20170716T102021_N0205_R065_T32TNR_20170716T102324.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-16 10:20:21 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL1C_20170721T102029_N0205_R065_T32TNR_20170721T102331.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-21 10:20:29 UTC" </span> -<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20170726T102021_N0205_R065_T32TNR_20170726T102259.SAFE </span> -<span class="r-out co"><span class="r-pr">#></span> "2017-07-26 10:20:21 UTC" </span> +<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL2A_20200801T100559_N0214_R022_T32TNR_20200801T135302.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "2020-08-01 10:05:59 UTC" </span> +<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "2020-08-04 10:15:59 UTC" </span> +<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20200806T101031_N0214_R022_T32TNR_20200806T115620.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "2020-08-06 10:10:31 UTC" </span> +<span class="r-out co"><span class="r-pr">#></span> S2A_MSIL2A_20200809T102031_N0214_R065_T32TNR_20200809T130506.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "2020-08-09 10:20:31 UTC" </span> +<span class="r-out co"><span class="r-pr">#></span> S2B_MSIL2A_20200811T100559_N0214_R022_T32TNR_20200811T133733.SAFE </span> +<span class="r-out co"><span class="r-pr">#></span> "2020-08-11 10:05:59 UTC" </span> <span class="r-in"><span></span></span> <span class="r-in"><span><span class="co"># }</span></span></span> </code></pre></div> diff --git a/docs/reference/s2_mask.html b/docs/reference/s2_mask.html index 900768ab..cd953ee5 100644 --- a/docs/reference/s2_mask.html +++ b/docs/reference/s2_mask.html @@ -22,7 +22,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> @@ -351,10 +351,10 @@ <h2>Examples</h2> <span class="r-in"><span> mask_type <span class="op">=</span> <span class="st">"land"</span>,</span></span> <span class="r-in"><span> outdir <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/tempfile.html" class="external-link">tempdir</a></span><span class="op">(</span><span class="op">)</span></span></span> <span class="r-in"><span><span class="op">)</span></span></span> -<span class="r-msg co"><span class="r-pr">#></span> [2023-10-19 16:28:14] Masking file</span> +<span class="r-msg co"><span class="r-pr">#></span> [2023-11-09 22:27:16] Masking file</span> <span class="r-msg co"><span class="r-pr">#></span> S2A2A_20190723_022_Barbellino_RGB432B_10.tif...</span> <span class="r-in"><span><span class="va">ex_out</span></span></span> -<span class="r-out co"><span class="r-pr">#></span> [1] "C:\\Users\\luigi.ranghetti\\AppData\\Local\\Temp\\RtmpkXRmAu/S2A2A_20190723_022_Barbellino_RGB432B_10.tif"</span> +<span class="r-out co"><span class="r-pr">#></span> [1] "/tmp/RtmpFvTjNK/S2A2A_20190723_022_Barbellino_RGB432B_10.tif"</span> <span class="r-out co"><span class="r-pr">#></span> attr(,"toomasked")</span> <span class="r-out co"><span class="r-pr">#></span> character(0)</span> <span class="r-in"><span></span></span> diff --git a/docs/reference/s2_merge.html b/docs/reference/s2_merge.html index 3d7171e8..2bfd3143 100644 --- a/docs/reference/s2_merge.html +++ b/docs/reference/s2_merge.html @@ -20,7 +20,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">sen2r</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.5.6</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="">1.6.0</span> </span> </div> diff --git a/docs/reference/s2_order.html b/docs/reference/s2_order.html index 6c49842d..d2c78dc0 100644 --- a/docs/reference/s2_order.html +++ b/docs/reference/s2_order.html @@ -1,6 +1,5 @@ <!DOCTYPE html> -<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Order S2 products. — s2_order • sen2rOrder S2 products (deprecated). — s2_order • sen2r @@ -18,7 +17,7 @@ sen2r - 1.5.6 + 1.6.0 @@ -88,14 +87,13 @@
-

The function orders S2 products from -Long Term Archive.

+

This function is deprecated and will be removed.

@@ -109,105 +107,7 @@

Order S2 products.

)
-
-

Arguments

-
s2_prodlist
-

Named character: list of the products to be ordered, -in the format safelist (see safelist). -Alternatively, it can be the path of a JSON file exported by a previous -execution of s2_order, in case the user wants, for any reason, to -resubmit the order.

- -
export_prodlist
-

Logical or character: if TRUE (default), -the list of ordered products is saved in a JSON text file, so to be easily -retrievable at a later stage with safe_is_online or s2_download; -if FALSE, no output files are generated. -It is also possible to pass the path of an existing folder in which the -JSON file will be saved (otherwise, a default path is used).

- - -
delay
-

Numeric: time frame (in seconds) to leave between two -consecutive orders. Default is 0.5 seconds: use a higher value if you -encountered errors (i.e. not all the products were correctly ordered).

- - -
apihub
-

Path of the apihub.txt file containing credentials -of SciHub account. -If NA (default), the default location inside the package will be used.

- - -
service
-

Character: it can be "dhus" or "apihub", in which cases -the required service is forced instead that the one present in the URLs -passed through argument s2_prodlist. -If NA (default), the service present in the URLs is maintained.

- - -
reorder
-

Logical: If TRUE, and a json file exported by s2_order -is passed as argument to the function, try to order again also -the "available" and "ordered" S2 datasets. -Otherwise, only order the "notordered" ones.

- -
-
-

Value

- - -

A named vector, containing the subset of s2_prodlist elements -which were ordered. -Moreover, the vector includes the following attributes:

  • "available" with the elements of s2_prodlist which were already -available for download,

  • -
  • "notordered" with the elements of s2_prodlist which were not ordered -for any reasons,

  • -
  • "path" (only if argument export_prodlist is not FALSE) with the path -of the json file in which the list of the products (ordered, available -and not ordered) was saved (if export_prodlist = TRUE).

  • -
-
-

Note

-

License: GPL 3.0

-
-
-

References

-

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. -doi:10.1016/j.cageo.2020.104473 -, URL: https://sen2r.ranghetti.info/.

-
-
-

Author

-

Luigi Ranghetti, phD (2019)

-

Lorenzo Busetto, phD (2020)

-
- -
-

Examples

-
if (FALSE) {
-
-# Generate the lists of products
-pos <- sf::st_sfc(sf::st_point(c(-57.8815,-51.6954)), crs = 4326)
-time_window <- as.Date(c("2019-10-21", "2019-11-20"))
-list_safe <- s2_list(spatial_extent = pos, time_interval = time_window)
-print(list_safe)
-# (at the time the documentation was updated, this list was containing 6
-# archives already available online and 3 stored in the Long Term Archive)
-
-# Order the products
-ordered_prods <- s2_order(list_safe)
-
-# Check in a second time if the product was made available
-(order_path <- attr(ordered_prods, "path"))
-safe_is_online(order_path)
-
-}
-
-
@@ -267,14 +267,14 @@

Examples

outdir = tempdir(), compress = 50 ) -#> [2023-10-19 16:28:19] Generating image +#> [2023-11-09 22:27:20] Generating image #> S2A2A_20190723_022_Barbellino_RGBb84B_10.tif... -#> [2023-10-19 16:28:20] Generating image +#> [2023-11-09 22:27:20] Generating image #> S2A2A_20190723_022_Barbellino_RGB954B_10.tif... #> 2 output RGB files were correctly created. ex_out -#> [1] "C:\\Users\\LUIGI~1.RAN\\AppData\\Local\\Temp\\RtmpkXRmAu/RGBb84B/S2A2A_20190723_022_Barbellino_RGBb84B_10.tif" -#> [2] "C:\\Users\\LUIGI~1.RAN\\AppData\\Local\\Temp\\RtmpkXRmAu/RGB954B/S2A2A_20190723_022_Barbellino_RGB954B_10.tif" +#> [1] "/tmp/RtmpFvTjNK/RGBb84B/S2A2A_20190723_022_Barbellino_RGBb84B_10.tif" +#> [2] "/tmp/RtmpFvTjNK/RGB954B/S2A2A_20190723_022_Barbellino_RGB954B_10.tif" # Show output oldpar <- par(mfrow = c(1,3), mar = rep(0,4)) diff --git a/docs/reference/s2_thumbnails.html b/docs/reference/s2_thumbnails.html index 61ca8778..b1a1f1d5 100644 --- a/docs/reference/s2_thumbnails.html +++ b/docs/reference/s2_thumbnails.html @@ -22,7 +22,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/s2_tiles-1.png b/docs/reference/s2_tiles-1.png index 4b79118a..858e4822 100644 Binary files a/docs/reference/s2_tiles-1.png and b/docs/reference/s2_tiles-1.png differ diff --git a/docs/reference/s2_tiles.html b/docs/reference/s2_tiles.html index 44bac258..d6940b32 100644 --- a/docs/reference/s2_tiles.html +++ b/docs/reference/s2_tiles.html @@ -19,7 +19,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/s2_translate.html b/docs/reference/s2_translate.html index c903839d..d50ebdb0 100644 --- a/docs/reference/s2_translate.html +++ b/docs/reference/s2_translate.html @@ -19,7 +19,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/safe_getMetadata.html b/docs/reference/safe_getMetadata.html index 011ad7c7..971ef8a6 100644 --- a/docs/reference/safe_getMetadata.html +++ b/docs/reference/safe_getMetadata.html @@ -22,7 +22,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/safe_is_online.html b/docs/reference/safe_is_online.html index bf7333a9..c5d96bb3 100644 --- a/docs/reference/safe_is_online.html +++ b/docs/reference/safe_is_online.html @@ -1,7 +1,5 @@ -Check if SAFE is available for download — safe_is_online • sen2rCheck if SAFE is available for download (deprecated) — safe_is_online • sen2r @@ -19,7 +17,7 @@ sen2r - 1.5.6 + 1.6.0 @@ -89,107 +87,20 @@
-

The function checks if the required SAFE archives are -available for download, or if they have to be ordered from the Long Term -Archive.

+

This function is deprecated and will be removed.

safe_is_online(s2_prodlist = NULL, apihub = NA, verbose = TRUE)
-
-

Arguments

-
s2_prodlist
-

Named character: list of the products to be checked, -in the format safelist (see safelist). -Alternatively, it can be the path of a JSON file exported by s2_order.

- -
apihub
-

Path of the "apihub.txt" file containing credentials -of SciHub account. -If NA (default), the default location inside the package will be used.

- - -
verbose
-

Logical: if TRUE, provide processing messages summarising -how many of the SAFE archives in s2_prodlist are available online.

- -
-
-

Value

- - -

A logical vector of the same length and names of the SAFE products -passed with s2_prodlist, -in which each element is TRUE if the corresponding SAFE archive is -available for download, FALSE if it is not or NA in case of errors with -the SAFE url.

-
-
-

Note

-

License: GPL 3.0

-
-
-

References

-

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. -doi:10.1016/j.cageo.2020.104473 -, URL: https://sen2r.ranghetti.info/.

-
-
-

Author

-

Luigi Ranghetti, phD (2019)

-

Lorenzo Busetto, phD (2020)

-
- -
-

Examples

-
# \donttest{
-if (is_scihub_configured()) {
-
-# Generate the lists of products
-pos <- sf::st_sfc(sf::st_point(c(-57.8815,-51.6954)), crs = 4326)
-time_window <- as.Date(c("2018-02-21", "2018-03-20"))
-list_safe <- s2_list(spatial_extent = pos, time_interval = time_window)
-# (at the time the documentation was written, this list was containing 5
-# archives already available online and 2 stored in the Long Term Archive)
-
-# Check for availability
-safe_is_online(list_safe)
-
-}
-#> Spherical geometry (s2) switched off
-#> old-style crs object detected; please recreate object with a recent sf::st_crs()
-#> old-style crs object detected; please recreate object with a recent sf::st_crs()
-#> old-style crs object detected; please recreate object with a recent sf::st_crs()
-#> Spherical geometry (s2) switched on
-#> 0 out of 7 products are online.
-#> S2B_MSIL1C_20180224T133629_N0206_R038_T21FVC_20180224T194845.SAFE 
-#>                                                             FALSE 
-#> S2B_MSIL1C_20180227T134629_N0206_R081_T21FVC_20180227T200327.SAFE 
-#>                                                             FALSE 
-#> S2A_MSIL1C_20180301T133641_N0206_R038_T21FVC_20180301T145524.SAFE 
-#>                                                             FALSE 
-#> S2B_MSIL1C_20180306T133629_N0206_R038_T21FVC_20180306T183210.SAFE 
-#>                                                             FALSE 
-#> S2A_MSIL1C_20180311T133641_N0206_R038_T21FVC_20180311T163528.SAFE 
-#>                                                             FALSE 
-#> S2A_MSIL1C_20180314T134631_N0206_R081_T21FVC_20180314T150724.SAFE 
-#>                                                             FALSE 
-#> S2B_MSIL1C_20180316T133639_N0206_R038_T21FVC_20180316T145348.SAFE 
-#>                                                             FALSE 
-# }
-
-
diff --git a/docs/reference/safelist-class.html b/docs/reference/safelist-class.html index e6e2c151..fcf1cf10 100644 --- a/docs/reference/safelist-class.html +++ b/docs/reference/safelist-class.html @@ -33,7 +33,7 @@ sen2r - 1.5.6 + 1.6.0
@@ -174,147 +174,43 @@

Examples

} else { list_safe <- as(character(), "safelist") } -#> Spherical geometry (s2) switched off -#> old-style crs object detected; please recreate object with a recent sf::st_crs() -#> old-style crs object detected; please recreate object with a recent sf::st_crs() -#> old-style crs object detected; please recreate object with a recent sf::st_crs() -#> Spherical geometry (s2) switched on list_safe -#> A named vector with 3 SAFE archives. -#> S2A_MSIL2A_20170507T102031_N0205_R065_T32TNR_20170507T102319.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('a4a026c0-db7b-4ba8-9b09-53027ab0d7ab')/$value" -#> S2A_MSIL2A_20170517T102031_N0205_R065_T32TNR_20170517T102352.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('6b7bb7bb-7598-45ac-9f2c-a3bd9cdc092f')/$value" -#> S2A_MSIL2A_20170527T102031_N0205_R065_T32TNR_20170527T102301.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('868b5b3c-92ac-412a-8a04-167008a1f08f')/$value" -#> The following attributes are included: mission, level, id_tile, id_orbit, sensing_datetime, ingestion_datetime, clouds, footprint, uuid, online. +#> A named vector with 0 SAFE archives. +#> character(0) class(list_safe) #> [1] "safelist" "character" attr(list_safe, "sensing_datetime") # extract an hidden attribute from a safelist -#> [1] "2017-05-07 10:20:31 UTC" "2017-05-17 10:20:31 UTC" -#> [3] "2017-05-27 10:20:31 UTC" +#> NULL ## Convert to other classes (s2_char <- as.character(list_safe)) # convert to a simple named character -#> S2A_MSIL2A_20170507T102031_N0205_R065_T32TNR_20170507T102319.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('a4a026c0-db7b-4ba8-9b09-53027ab0d7ab')/$value" -#> S2A_MSIL2A_20170517T102031_N0205_R065_T32TNR_20170517T102352.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('6b7bb7bb-7598-45ac-9f2c-a3bd9cdc092f')/$value" -#> S2A_MSIL2A_20170527T102031_N0205_R065_T32TNR_20170527T102301.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('868b5b3c-92ac-412a-8a04-167008a1f08f')/$value" +#> character(0) (s2_df <- as.data.frame(list_safe)) # convert to a data.frame -#> name -#> 1 S2A_MSIL2A_20170507T102031_N0205_R065_T32TNR_20170507T102319.SAFE -#> 2 S2A_MSIL2A_20170517T102031_N0205_R065_T32TNR_20170517T102352.SAFE -#> 3 S2A_MSIL2A_20170527T102031_N0205_R065_T32TNR_20170527T102301.SAFE -#> url -#> 1 https://apihub.copernicus.eu/apihub/odata/v1/Products('a4a026c0-db7b-4ba8-9b09-53027ab0d7ab')/$value -#> 2 https://apihub.copernicus.eu/apihub/odata/v1/Products('6b7bb7bb-7598-45ac-9f2c-a3bd9cdc092f')/$value -#> 3 https://apihub.copernicus.eu/apihub/odata/v1/Products('868b5b3c-92ac-412a-8a04-167008a1f08f')/$value -#> mission level id_tile id_orbit sensing_datetime ingestion_datetime -#> 1 2A 2Ap 32TNR 065 2017-05-07 10:20:31 2017-05-09 06:30:41 -#> 2 2A 2Ap 32TNR 065 2017-05-17 10:20:31 2017-06-08 12:21:23 -#> 3 2A 2Ap 32TNR 065 2017-05-27 10:20:31 2017-05-29 08:30:44 -#> clouds -#> 1 99.999908 -#> 2 8.670091 -#> 3 6.359588 -#> footprint -#> 1 POLYGON ((8.999741 46.05357, 10.4189 46.04477, 10.39425 45.05675, 8.999746 45.06526, 8.999741 46.05357, 8.999741 46.05357)) -#> 2 POLYGON ((8.999741 46.05357, 10.4189 46.04477, 10.39425 45.05675, 8.999746 45.06526, 8.999741 46.05357, 8.999741 46.05357)) -#> 3 POLYGON ((8.999741 46.05357, 10.4189 46.04477, 10.39425 45.05675, 8.999746 45.06526, 8.999741 46.05357)) -#> uuid online -#> 1 a4a026c0-db7b-4ba8-9b09-53027ab0d7ab NA -#> 2 6b7bb7bb-7598-45ac-9f2c-a3bd9cdc092f NA -#> 3 868b5b3c-92ac-412a-8a04-167008a1f08f NA +#> [1] url +#> <0 rows> (or 0-length row.names) library(data.table) #> -#> Attaching package: 'data.table' -#> The following object is masked from 'package:raster': +#> Attaching package: ‘data.table’ +#> The following object is masked from ‘package:raster’: #> #> shift (s2_dt <- as.data.table(list_safe)) # convert to a data.table -#> name -#> 1: S2A_MSIL2A_20170507T102031_N0205_R065_T32TNR_20170507T102319.SAFE -#> 2: S2A_MSIL2A_20170517T102031_N0205_R065_T32TNR_20170517T102352.SAFE -#> 3: S2A_MSIL2A_20170527T102031_N0205_R065_T32TNR_20170527T102301.SAFE -#> url -#> 1: https://apihub.copernicus.eu/apihub/odata/v1/Products('a4a026c0-db7b-4ba8-9b09-53027ab0d7ab')/$value -#> 2: https://apihub.copernicus.eu/apihub/odata/v1/Products('6b7bb7bb-7598-45ac-9f2c-a3bd9cdc092f')/$value -#> 3: https://apihub.copernicus.eu/apihub/odata/v1/Products('868b5b3c-92ac-412a-8a04-167008a1f08f')/$value -#> mission level id_tile id_orbit sensing_datetime ingestion_datetime -#> 1: 2A 2Ap 32TNR 065 2017-05-07 10:20:31 2017-05-09 06:30:41 -#> 2: 2A 2Ap 32TNR 065 2017-05-17 10:20:31 2017-06-08 12:21:23 -#> 3: 2A 2Ap 32TNR 065 2017-05-27 10:20:31 2017-05-29 08:30:44 -#> clouds -#> 1: 99.999908 -#> 2: 8.670091 -#> 3: 6.359588 -#> footprint -#> 1: POLYGON ((8.999741 46.05357, 10.4189 46.04477, 10.39425 45.05675, 8.999746 45.06526, 8.999741 46.05357, 8.999741 46.05357)) -#> 2: POLYGON ((8.999741 46.05357, 10.4189 46.04477, 10.39425 45.05675, 8.999746 45.06526, 8.999741 46.05357, 8.999741 46.05357)) -#> 3: POLYGON ((8.999741 46.05357, 10.4189 46.04477, 10.39425 45.05675, 8.999746 45.06526, 8.999741 46.05357)) -#> uuid online -#> 1: a4a026c0-db7b-4ba8-9b09-53027ab0d7ab NA -#> 2: 6b7bb7bb-7598-45ac-9f2c-a3bd9cdc092f NA -#> 3: 868b5b3c-92ac-412a-8a04-167008a1f08f NA +#> Empty data.table (0 rows and 1 cols): url library(sf) if (!is.null(attr(list_safe, "footprint"))) { (s2_sf <- st_as_sf(list_safe)) # convert to sf } -#> Simple feature collection with 3 features and 11 fields -#> Geometry type: POLYGON -#> Dimension: XY -#> Bounding box: xmin: 8.999741 ymin: 45.05675 xmax: 10.4189 ymax: 46.05357 -#> Geodetic CRS: WGS 84 -#> name -#> 1 S2A_MSIL2A_20170507T102031_N0205_R065_T32TNR_20170507T102319.SAFE -#> 2 S2A_MSIL2A_20170517T102031_N0205_R065_T32TNR_20170517T102352.SAFE -#> 3 S2A_MSIL2A_20170527T102031_N0205_R065_T32TNR_20170527T102301.SAFE -#> url -#> 1 https://apihub.copernicus.eu/apihub/odata/v1/Products('a4a026c0-db7b-4ba8-9b09-53027ab0d7ab')/$value -#> 2 https://apihub.copernicus.eu/apihub/odata/v1/Products('6b7bb7bb-7598-45ac-9f2c-a3bd9cdc092f')/$value -#> 3 https://apihub.copernicus.eu/apihub/odata/v1/Products('868b5b3c-92ac-412a-8a04-167008a1f08f')/$value -#> mission level id_tile id_orbit sensing_datetime ingestion_datetime -#> 1 2A 2Ap 32TNR 065 2017-05-07 10:20:31 2017-05-09 06:30:41 -#> 2 2A 2Ap 32TNR 065 2017-05-17 10:20:31 2017-06-08 12:21:23 -#> 3 2A 2Ap 32TNR 065 2017-05-27 10:20:31 2017-05-29 08:30:44 -#> clouds uuid online -#> 1 99.999908 a4a026c0-db7b-4ba8-9b09-53027ab0d7ab NA -#> 2 8.670091 6b7bb7bb-7598-45ac-9f2c-a3bd9cdc092f NA -#> 3 6.359588 868b5b3c-92ac-412a-8a04-167008a1f08f NA -#> footprint -#> 1 POLYGON ((8.999741 46.05357... -#> 2 POLYGON ((8.999741 46.05357... -#> 3 POLYGON ((8.999741 46.05357... ## Convert from other classes as(s2_char, "safelist") # this causes the loss of hidden attributes -#> A named vector with 3 SAFE archives. -#> S2A_MSIL2A_20170507T102031_N0205_R065_T32TNR_20170507T102319.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('a4a026c0-db7b-4ba8-9b09-53027ab0d7ab')/$value" -#> S2A_MSIL2A_20170517T102031_N0205_R065_T32TNR_20170517T102352.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('6b7bb7bb-7598-45ac-9f2c-a3bd9cdc092f')/$value" -#> S2A_MSIL2A_20170527T102031_N0205_R065_T32TNR_20170527T102301.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('868b5b3c-92ac-412a-8a04-167008a1f08f')/$value" +#> A named vector with 0 SAFE archives. +#> character(0) as(s2_df, "safelist") # this (and followings) maintain attributes as columns -#> A named vector with 3 SAFE archives. -#> S2A_MSIL2A_20170507T102031_N0205_R065_T32TNR_20170507T102319.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('a4a026c0-db7b-4ba8-9b09-53027ab0d7ab')/$value" -#> S2A_MSIL2A_20170517T102031_N0205_R065_T32TNR_20170517T102352.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('6b7bb7bb-7598-45ac-9f2c-a3bd9cdc092f')/$value" -#> S2A_MSIL2A_20170527T102031_N0205_R065_T32TNR_20170527T102301.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('868b5b3c-92ac-412a-8a04-167008a1f08f')/$value" -#> The following attributes are included: mission, level, id_tile, id_orbit, sensing_datetime, ingestion_datetime, clouds, footprint, uuid, online. +#> A named vector with 0 SAFE archives. +#> character(0) as(s2_dt, "safelist") -#> A named vector with 3 SAFE archives. -#> S2A_MSIL2A_20170507T102031_N0205_R065_T32TNR_20170507T102319.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('a4a026c0-db7b-4ba8-9b09-53027ab0d7ab')/$value" -#> S2A_MSIL2A_20170517T102031_N0205_R065_T32TNR_20170517T102352.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('6b7bb7bb-7598-45ac-9f2c-a3bd9cdc092f')/$value" -#> S2A_MSIL2A_20170527T102031_N0205_R065_T32TNR_20170527T102301.SAFE -#> "https://apihub.copernicus.eu/apihub/odata/v1/Products('868b5b3c-92ac-412a-8a04-167008a1f08f')/$value" -#> The following attributes are included: mission, level, id_tile, id_orbit, sensing_datetime, ingestion_datetime, clouds, footprint, uuid, online. +#> A named vector with 0 SAFE archives. +#> character(0) # } diff --git a/docs/reference/scihub_login.html b/docs/reference/scihub_login.html index e1d725a4..d5eed052 100644 --- a/docs/reference/scihub_login.html +++ b/docs/reference/scihub_login.html @@ -1,17 +1,5 @@ -Import / export / check SciHub username and password — read_scihub_login • sen2rImport / export / check SciHub username and password (deprecated) — read_scihub_login • sen2r @@ -29,7 +17,7 @@ sen2r - 1.5.6 + 1.6.0 @@ -99,22 +87,13 @@
- -
  • read_scihub_login() reads the SciHub login information;

  • -
  • write_scihub_login() saves new username and password;

  • -
  • check_scihub_login() checks their validity;

  • -
  • is_scihub_configured() check if SciHub credentials are configured.

  • -

Login information is stored in a file apihub.txt inside the -".sen2r" subfolder of the home directory. These functions allow reading -or writing this file, and editing it from the GUI. -In case file apihub.txt is missing, read_scihub_login() searches inside -the environmental variables SCIHUB_USER and SCIHUB_PASSWORD.

+

These functions are deprecated and will be removed.

@@ -135,99 +114,7 @@

Import / export / check SciHub username and password

)
-
-

Arguments

-
apihub_path
-

Path of the file in which login information is saved. -If NA (default) it is automatically read from the package default location.

- - -
username
-

SciHub username.

- - -
password
-

SciHub password.

- - -
service
-

Character: it can be "dhus" or "apihub" (default).

- - -
check
-

Logical: if TRUE (default), new credentials are checked -before writing them on apihub_path (if they are invalid, an error -is provided); -if FALSE, they are directly written.

- - -
append
-

Logical: if TRUE, new credentials are added -to the ones existing within apihub_path; -if FALSE (default), apihub_path is replaced with the new ones.

- -
-
-

Value

- -

read_scihub_login() returns a matrix of credentials, -in which username is in the first column, password in the second.

- - -

is_scihub_configured() returns TRUE if credentials can be -accessed, FALSE if not.

- - -

check_scihub_login() returns TRUE if credentials are valid, -FALSE elsewhere.

- - -

check_scihub_connection() returns TRUE if internet connection -is available and SciHub is accessible, FALSE otherwise.

- - -

write_scihub_login() returns NULL.

-
-
-

Details

-

Notice that new/recently updated SciHub credentials are recognised by API Hub -with a delay of about one week (see https://scihub.copernicus.eu/twiki/do/view/SciHubWebPortal/APIHubDescription for details).

-

For this reason, newly created credentials can not immediately be used by sen2r, -and password edits on old credentials are not immediately recognised.

-
-
-

Note

-

License: GPL 3.0

-
-
-

References

-

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. -doi:10.1016/j.cageo.2020.104473 -, URL: https://sen2r.ranghetti.info/.

-
-
-

Author

-

Luigi Ranghetti, phD (2019)

-

Lorenzo Busetto, phD (2019)

-
- -
-

Examples

-
# \donttest{
-is_scihub_configured()
-#> [1] TRUE
-# }
-if (FALSE) {
-check_scihub_connection()
-check_scihub_login("username", "password")
-write_scihub_login("username", "password")
-read_scihub_login()
-}
-
-
diff --git a/docs/reference/sen2r-1.png b/docs/reference/sen2r-1.png index 776f3875..4b0ebcc3 100644 Binary files a/docs/reference/sen2r-1.png and b/docs/reference/sen2r-1.png differ diff --git a/docs/reference/sen2r-2.png b/docs/reference/sen2r-2.png index 178bb2d1..294c7b6b 100644 Binary files a/docs/reference/sen2r-2.png and b/docs/reference/sen2r-2.png differ diff --git a/docs/reference/sen2r-3.png b/docs/reference/sen2r-3.png index cb96f6e0..e4b6e7b4 100644 Binary files a/docs/reference/sen2r-3.png and b/docs/reference/sen2r-3.png differ diff --git a/docs/reference/sen2r.html b/docs/reference/sen2r.html index 586e4dda..88fa8037 100644 --- a/docs/reference/sen2r.html +++ b/docs/reference/sen2r.html @@ -21,7 +21,7 @@ sen2r - 1.5.6 + 1.6.0 @@ -112,7 +112,7 @@

Find, download and preprocess Sentinel-2 images

s2_levels = "l2a", sel_sensor = c("s2a", "s2b"), online = TRUE, - server = "scihub", + server = "gcloud", order_lta = TRUE, apihub = NA, downloader = "builtin", @@ -222,13 +222,12 @@

Arguments

server
-

(optional) Character vector of length 1 or 2, with the names of +

(deprecate) Character vector of length 1, with the names of the servers on which SAFE archives are searched. -Available options are "scihub" (ESA Sentinel Hub) and "gcloud" -(Google Cloud). -Default is "scihub", meaning that only ESA Sentinel Hub is considered. -In case of multiple values, they are used in order of priority and -products on LTA are always left as last choice. +Currently, only "gcloud" (Google Cloud) is supported. +Old "scihub" (ESA Sentinel Hub) can no more be used, since November 2023, +when the Copernicus Sentinel Data is no longer available and has been +replaced by the Copernicus Data Space Ecosystem. See also the section "Details" of s2_list().

@@ -240,10 +239,7 @@

Arguments

apihub
-

Path of the text file containing credentials -of SciHub account. -If NA (default), the default location inside the package will be used. -It takes effect only if argument server includes "scihub".

+

deprecated

downloader
@@ -714,45 +710,43 @@

Examples

} else { out_paths_2 <- character(0) } -#> [2023-10-19 16:28:48] #### Starting sen2r execution. #### +#> [2023-11-09 22:27:28] #### Starting sen2r execution. #### #> Spherical geometry (s2) switched off #> Loading required namespace: stringi -#> [2023-10-19 16:28:49] Searching for available SAFE products... +#> [2023-11-09 22:27:30] Searching for available SAFE products... #> old-style crs object detected; please recreate object with a recent sf::st_crs() #> old-style crs object detected; please recreate object with a recent sf::st_crs() -#> [2023-10-19 16:28:50] Querying Google Cloud (this can take a very long +#> [2023-11-09 22:27:30] Querying Google Cloud (this can take a very long #> time)... -#> [2023-10-19 16:46:33] Computing output names... -#> [2023-10-19 16:46:34] Starting to download the required level-2A SAFE +#> [2023-11-09 22:27:39] Computing output names... +#> [2023-11-09 22:27:40] Starting to download the required level-2A SAFE #> products. -#> Images -#> S2B_MSIL2A_20200801T100559_N0214_R022_T32TNS_20200801T135302.SAFE are -#> already on your system and will be skipped. Set "overwrite_safe" to -#> TRUE to re-download them. -#> No L2A images are needed. -#> [2023-10-19 16:46:34] Download of level-2A SAFE products terminated. -#> [2023-10-19 16:46:34] Starting to download the required level-1C SAFE +#> [2023-11-09 22:27:40] Check if products are available for download... +#> [2023-11-09 22:27:40] Downloading Sentinel-2 image 1 of 1 +#> (S2B_MSIL2A_20200801T100559_N0214_R022_T32TNS_20200801T135302.SAFE)... +#> [2023-11-09 22:27:44] Download of level-2A SAFE products terminated. +#> [2023-11-09 22:27:44] Starting to download the required level-1C SAFE #> products. #> No L1C images are needed. -#> [2023-10-19 16:46:34] Download of level-1C SAFE products terminated. -#> [2023-10-19 16:46:34] Updating output names... -#> [2023-10-19 16:46:35] Starting to translate SAFE products in custom +#> [2023-11-09 22:27:44] Download of level-1C SAFE products terminated. +#> [2023-11-09 22:27:44] Updating output names... +#> [2023-11-09 22:27:44] Starting to translate SAFE products in custom #> format. #> Using UTM zone 32N. #> 2 output files were correctly created. -#> [2023-10-19 16:46:35] Starting to merge tiles by orbit. -#> [2023-10-19 16:46:36] Starting to edit geometry (clip, reproject, +#> [2023-11-09 22:27:45] Starting to merge tiles by orbit. +#> [2023-11-09 22:27:45] Starting to edit geometry (clip, reproject, #> rescale). -#> [2023-10-19 16:46:37] Producing required RGB images. -#> [2023-10-19 16:46:37] Generating image +#> [2023-11-09 22:27:45] Producing required RGB images. +#> [2023-11-09 22:27:45] Generating image #> S2B2A_20200801_022_sen2r_RGB432B_10.tif... -#> [2023-10-19 16:46:38] Generating image +#> [2023-11-09 22:27:46] Generating image #> S2B2A_20200801_022_sen2r_RGB843B_10.tif... #> 2 output RGB files were correctly created. -#> [2023-10-19 16:46:41] Computing required spectral indices. -#> [2023-10-19 16:46:41] Computing index MSAVI2 on date 2020-08-01... -#> [2023-10-19 16:46:42] Computing index NDVI on date 2020-08-01... -#> [2023-10-19 16:46:43] Generating thumbnails. +#> [2023-11-09 22:27:49] Computing required spectral indices. +#> [2023-11-09 22:27:49] Computing index MSAVI2 on date 2020-08-01... +#> [2023-11-09 22:27:50] Computing index NDVI on date 2020-08-01... +#> [2023-11-09 22:27:51] Generating thumbnails. #> 6 output files were correctly created. #> ╔══════════════════════════════════════════════════════════════════════ #> ║ sen2r Processing Report @@ -760,9 +754,9 @@

Examples

#> ║ Dates to be processed based on processing parameters: 1 #> ║ Processing completed for: all expected dates. #> ╚══════════════════════════════════════════════════════════════════════ -#> [2023-10-19 16:46:45] #### sen2r session terminated. #### +#> [2023-11-09 22:27:53] #### sen2r session terminated. #### #> The processing chain can be re-launched with the command: -#>   sen2r("C:/Users/LUIGI~1.RAN/DOCUME~1/SEN2R~1/proc_par/s2proc_20231019_162849.json") +#>   sen2r("/home/lranghetti/.sen2r/proc_par/s2proc_20231109_222728.json") #> Spherical geometry (s2) switched on # Notice that passing the path of a JSON file results in launching # a session without opening the gui, unless gui = TRUE is passed. @@ -790,63 +784,61 @@

Examples

} else { out_paths_3 <- character(0) } -#> [2023-10-19 16:46:46] #### Starting sen2r execution. #### +#> [2023-11-09 22:27:54] #### Starting sen2r execution. #### #> Spherical geometry (s2) switched off -#> [2023-10-19 16:46:46] Searching for available SAFE products... +#> [2023-11-09 22:27:55] Searching for available SAFE products... #> old-style crs object detected; please recreate object with a recent sf::st_crs() #> old-style crs object detected; please recreate object with a recent sf::st_crs() -#> [2023-10-19 16:46:47] Querying Google Cloud (this can take a very long +#> [2023-11-09 22:27:55] Querying Google Cloud (this can take a very long #> time)... #> old-style crs object detected; please recreate object with a recent sf::st_crs() #> old-style crs object detected; please recreate object with a recent sf::st_crs() -#> [2023-10-19 17:04:23] Querying Google Cloud (this can take a very long +#> [2023-11-09 22:28:06] Querying Google Cloud (this can take a very long #> time)... -#> [2023-10-19 17:21:55] Computing output names... -#> [2023-10-19 17:21:56] Starting to download the required level-2A SAFE +#> [2023-11-09 22:28:14] Computing output names... +#> [2023-11-09 22:28:16] Starting to download the required level-2A SAFE #> products. #> Images #> S2B_MSIL2A_20200801T100559_N0214_R022_T32TNS_20200801T135302.SAFE are #> already on your system and will be skipped. Set "overwrite_safe" to #> TRUE to re-download them. #> No L2A images are needed. -#> [2023-10-19 17:21:56] Download of level-2A SAFE products terminated. -#> [2023-10-19 17:21:56] Starting to download the required level-1C SAFE +#> [2023-11-09 22:28:16] Download of level-2A SAFE products terminated. +#> [2023-11-09 22:28:16] Starting to download the required level-1C SAFE #> products. -#> Images -#> S2B_MSIL1C_20200801T100559_N0209_R022_T32TNS_20200801T130136.SAFE are -#> already on your system and will be skipped. Set "overwrite_safe" to -#> TRUE to re-download them. -#> No L1C images are needed. -#> [2023-10-19 17:21:56] Download of level-1C SAFE products terminated. -#> [2023-10-19 17:21:56] Updating output names... -#> [2023-10-19 17:21:56] Starting to translate SAFE products in custom +#> [2023-11-09 22:28:16] Check if products are available for download... +#> [2023-11-09 22:28:16] Downloading Sentinel-2 image 1 of 1 +#> (S2B_MSIL1C_20200801T100559_N0209_R022_T32TNS_20200801T130136.SAFE)... +#> [2023-11-09 22:28:19] Download of level-1C SAFE products terminated. +#> [2023-11-09 22:28:19] Updating output names... +#> [2023-11-09 22:28:20] Starting to translate SAFE products in custom #> format. #> Using UTM zone 32N. #> 1 output files were correctly created. #> Using UTM zone 32N. #> 1 output angle files were correctly created. #> 3 output files were correctly created. -#> [2023-10-19 17:21:57] Starting to merge tiles by orbit. -#> [2023-10-19 17:21:58] Starting to edit geometry (clip, reproject, +#> [2023-11-09 22:28:21] Starting to merge tiles by orbit. +#> [2023-11-09 22:28:21] Starting to edit geometry (clip, reproject, #> rescale). -#> [2023-10-19 17:21:59] Starting to apply cloud masks. -#> [2023-10-19 17:21:59] Masking file +#> [2023-11-09 22:28:21] Starting to apply cloud masks. +#> [2023-11-09 22:28:21] Masking file #> S2B1C_20200801_022_Barbellino_TOA_10.tif... -#> [2023-10-19 17:22:02] Masking file +#> [2023-11-09 22:28:28] Masking file #> S2B2A_20200801_022_Barbellino_BOA_10.tif... -#> [2023-10-19 17:22:05] Producing required RGB images. -#> [2023-10-19 17:22:05] Generating image +#> [2023-11-09 22:28:35] Producing required RGB images. +#> [2023-11-09 22:28:35] Generating image #> S2B1C_20200801_022_Barbellino_RGB432T_10.tif... #> 1 output RGB files were correctly created. -#> [2023-10-19 17:22:07] Generating image +#> [2023-11-09 22:28:36] Generating image #> S2B2A_20200801_022_Barbellino_RGB432B_10.tif... -#> [2023-10-19 17:22:08] Generating image +#> [2023-11-09 22:28:37] Generating image #> S2B2A_20200801_022_Barbellino_RGB843B_10.tif... #> 2 output RGB files were correctly created. -#> [2023-10-19 17:22:11] Computing required spectral indices. -#> [2023-10-19 17:22:11] Computing index NDVI on date 2020-08-01... -#> [2023-10-19 17:22:11] Computing index MSAVI2 on date 2020-08-01... -#> [2023-10-19 17:22:11] Generating thumbnails. +#> [2023-11-09 22:28:40] Computing required spectral indices. +#> [2023-11-09 22:28:40] Computing index NDVI on date 2020-08-01... +#> [2023-11-09 22:28:40] Computing index MSAVI2 on date 2020-08-01... +#> [2023-11-09 22:28:40] Generating thumbnails. #> 9 output files were correctly created. #> ╔══════════════════════════════════════════════════════════════════════ #> ║ sen2r Processing Report @@ -854,9 +846,9 @@

Examples

#> ║ Dates to be processed based on processing parameters: 1 #> ║ Processing completed for: all expected dates. #> ╚══════════════════════════════════════════════════════════════════════ -#> [2023-10-19 17:22:14] #### sen2r session terminated. #### +#> [2023-11-09 22:28:44] #### sen2r session terminated. #### #> The processing chain can be re-launched with the command: -#>   sen2r("C:/Users/LUIGI~1.RAN/DOCUME~1/SEN2R~1/proc_par/s2proc_20231019_164646.json") +#>   sen2r("/home/lranghetti/.sen2r/proc_par/s2proc_20231109_222754.json") #> Spherical geometry (s2) switched on if (is_gcloud_configured()) { diff --git a/docs/reference/sen2r_getElements.html b/docs/reference/sen2r_getElements.html index 2b8a8e34..f73eedc2 100644 --- a/docs/reference/sen2r_getElements.html +++ b/docs/reference/sen2r_getElements.html @@ -19,7 +19,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/sen2r_process_report.html b/docs/reference/sen2r_process_report.html index 43b6b0fb..24420e69 100644 --- a/docs/reference/sen2r_process_report.html +++ b/docs/reference/sen2r_process_report.html @@ -18,7 +18,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/smooth_mask.html b/docs/reference/smooth_mask.html index 6b19bfb4..a730613d 100644 --- a/docs/reference/smooth_mask.html +++ b/docs/reference/smooth_mask.html @@ -20,7 +20,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/st_as_text_2.html b/docs/reference/st_as_text_2.html index 22de48fa..46ee6af2 100644 --- a/docs/reference/st_as_text_2.html +++ b/docs/reference/st_as_text_2.html @@ -23,7 +23,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/st_crs2.html b/docs/reference/st_crs2.html index 15f579c9..49ab1b2b 100644 --- a/docs/reference/st_crs2.html +++ b/docs/reference/st_crs2.html @@ -20,7 +20,7 @@ sen2r - 1.5.6 + 1.6.0 @@ -200,7 +200,7 @@

Examples

#> ORDER[2], #> LENGTHUNIT["metre",1]], #> USAGE[ -#> SCOPE["Navigation and medium accuracy spatial referencing."], +#> SCOPE["Engineering survey, topographic mapping."], #> AREA["Between 132°W and 126°W, northern hemisphere between equator and 84°N, onshore and offshore. Canada - British Columbia (BC); NorthW Territories (NWT); Yukon. United States (USA) - Alaska (AK)."], #> BBOX[0,-132,84,-126]], #> ID["EPSG",32609]] @@ -242,7 +242,7 @@

Examples

#> ORDER[2], #> LENGTHUNIT["metre",1]], #> USAGE[ -#> SCOPE["Navigation and medium accuracy spatial referencing."], +#> SCOPE["Engineering survey, topographic mapping."], #> AREA["Between 132°W and 126°W, northern hemisphere between equator and 84°N, onshore and offshore. Canada - British Columbia (BC); NorthW Territories (NWT); Yukon. United States (USA) - Alaska (AK)."], #> BBOX[0,-132,84,-126]], #> ID["EPSG",32609]] @@ -286,7 +286,7 @@

Examples

#> ORDER[2], #> LENGTHUNIT["metre",1]], #> USAGE[ -#> SCOPE["Navigation and medium accuracy spatial referencing."], +#> SCOPE["Engineering survey, topographic mapping."], #> AREA["Between 132°W and 126°W, northern hemisphere between equator and 84°N, onshore and offshore. Canada - British Columbia (BC); NorthW Territories (NWT); Yukon. United States (USA) - Alaska (AK)."], #> BBOX[0,-132,84,-126]], #> ID["EPSG",32609]] @@ -328,7 +328,7 @@

Examples

#> ORDER[2], #> LENGTHUNIT["metre",1]], #> USAGE[ -#> SCOPE["Navigation and medium accuracy spatial referencing."], +#> SCOPE["Engineering survey, topographic mapping."], #> AREA["Between 132°W and 126°W, northern hemisphere between equator and 84°N, onshore and offshore. Canada - British Columbia (BC); NorthW Territories (NWT); Yukon. United States (USA) - Alaska (AK)."], #> BBOX[0,-132,84,-126]], #> ID["EPSG",32609]] @@ -370,7 +370,7 @@

Examples

#> ORDER[2], #> LENGTHUNIT["metre",1]], #> USAGE[ -#> SCOPE["Navigation and medium accuracy spatial referencing."], +#> SCOPE["Engineering survey, topographic mapping."], #> AREA["Between 132°W and 126°W, northern hemisphere between equator and 84°N, onshore and offshore. Canada - British Columbia (BC); NorthW Territories (NWT); Yukon. United States (USA) - Alaska (AK)."], #> BBOX[0,-132,84,-126]], #> ID["EPSG",32609]] @@ -412,7 +412,7 @@

Examples

#> ORDER[2], #> LENGTHUNIT["metre",1]], #> USAGE[ -#> SCOPE["Navigation and medium accuracy spatial referencing."], +#> SCOPE["Engineering survey, topographic mapping."], #> AREA["Between 132°W and 126°W, southern hemisphere between 80°S and equator, onshore and offshore."], #> BBOX[-80,-132,0,-126]], #> ID["EPSG",32709]] diff --git a/docs/reference/stack2rgb.html b/docs/reference/stack2rgb.html index 114a452b..7b1f160e 100644 --- a/docs/reference/stack2rgb.html +++ b/docs/reference/stack2rgb.html @@ -19,7 +19,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/str_pad2.html b/docs/reference/str_pad2.html index 640751b2..f2c57e75 100644 --- a/docs/reference/str_pad2.html +++ b/docs/reference/str_pad2.html @@ -21,7 +21,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/suppress_warnings.html b/docs/reference/suppress_warnings.html index 37cc5a56..ce9df3bd 100644 --- a/docs/reference/suppress_warnings.html +++ b/docs/reference/suppress_warnings.html @@ -17,7 +17,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/tile_utmzone.html b/docs/reference/tile_utmzone.html index 569e68d8..9e2edaa5 100644 --- a/docs/reference/tile_utmzone.html +++ b/docs/reference/tile_utmzone.html @@ -18,7 +18,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/tiles_intersects.html b/docs/reference/tiles_intersects.html index f6793e4f..cd8bc1aa 100644 --- a/docs/reference/tiles_intersects.html +++ b/docs/reference/tiles_intersects.html @@ -18,7 +18,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/reference/trace_function.html b/docs/reference/trace_function.html index 9cc4d2ea..7e9f1d1b 100644 --- a/docs/reference/trace_function.html +++ b/docs/reference/trace_function.html @@ -36,7 +36,7 @@ sen2r - 1.5.6 + 1.6.0 diff --git a/docs/sitemap.xml b/docs/sitemap.xml index a70d4830..50726de3 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,40 +4,40 @@ /404.html - /articles/docker.html + /CODE-OF-CONDUCT.html - /articles/index.html + /CONDUCT.html - /articles/installation.html + /ISSUE_TEMPLATE.html - /articles/outstructure.html + /LICENSE.html - /articles/sen2r_cmd.html + /articles/docker.html - /articles/sen2r_gui.html + /articles/index.html - /authors.html + /articles/installation.html - /CODE-OF-CONDUCT.html + /articles/outstructure.html - /CONDUCT.html + /articles/sen2r_cmd.html - /index.html + /articles/sen2r_gui.html - /ISSUE_TEMPLATE.html + /authors.html - /LICENSE.html + /index.html /news/index.html @@ -102,9 +102,6 @@ /reference/gdalUtil.html - - /reference/gdalwarp_grid.html - /reference/gdal_abs2rel_rel2abs.html @@ -114,6 +111,9 @@ /reference/gdal_warp.html + + /reference/gdalwarp_grid.html + /reference/gipp.html @@ -213,9 +213,6 @@ /reference/s2_translate.html - - /reference/safelist-class.html - /reference/safe_getMetadata.html @@ -225,6 +222,9 @@ /reference/safe_shortname.html + + /reference/safelist-class.html + /reference/scihub_login.html @@ -244,25 +244,25 @@ /reference/smooth_mask.html - /reference/stack2rgb.html + /reference/st_as_text_2.html - /reference/str_pad2.html + /reference/st_crs2.html - /reference/st_as_text_2.html + /reference/stack2rgb.html - /reference/st_crs2.html + /reference/str_pad2.html /reference/suppress_warnings.html - /reference/tiles_intersects.html + /reference/tile_utmzone.html - /reference/tile_utmzone.html + /reference/tiles_intersects.html /reference/trace_function.html diff --git a/index.Rmd b/index.Rmd index bf3b67b2..deef35e1 100644 --- a/index.Rmd +++ b/index.Rmd @@ -52,12 +52,18 @@ allows to: * mask cloudy pixels (using the Surface Classification Map as masking layer); * computing spectral indices and RGB images. -**New feature**: starting from version 1.5.0, -Sentinel-2 SAFE archives can be downloaded both from official -[Copernicus Open Access Hub](https://scihub.copernicus.eu/) or from -[Google Cloud Sentinel-2 bucket](https://cloud.google.com/storage/docs/public-datasets/sentinel-2) -(this option can be useful to bypass limitations of ESA Long Term Archive -retention time; refer to [this post](https://luigi.ranghetti.info/post/safe-gcloud/) for details). +**Important**: since November 2023, +Sentinel-2 SAFE archives can be searched and retrieved only from [Google Cloud Sentinel-2 bucket](https://cloud.google.com/storage/docs/public-datasets/sentinel-2); +to use it, **Google Cloud SDK must be installed** and configured following the +[official instructions](https://cloud.google.com/sdk/docs/install). +Refer to [this post](https://luigi.ranghetti.info/post/safe-gcloud/) for details +about how to install configure the required external dependency Google Cloud SDK. +Notice that this mode is not optimal (a modern STAC API approach should be used), +and searching products could be a very slow process. +Nevertheless, the replacement of the old official data source (ESA Hub) with the +new [Copernicus Data Space](https://dataspace.copernicus.eu/analyse/apis) is not +planned (this package is no longer actively maintained due to a career change of the developer). +Anyone who wants to help [can contribute](https://github.com/ranghetti/sen2r/issues/464)). Setting the execution of this processing chain is particularly easy using the sen2r diff --git a/index.md b/index.md index b9ed633a..634ced99 100644 --- a/index.md +++ b/index.md @@ -53,13 +53,18 @@ allows to: layer); - computing spectral indices and RGB images. -**New feature**: starting from version 1.5.0, Sentinel-2 SAFE archives -can be downloaded both from official [Copernicus Open Access -Hub](https://scihub.copernicus.eu/) or from [Google Cloud Sentinel-2 -bucket](https://cloud.google.com/storage/docs/public-datasets/sentinel-2) -(this option can be useful to bypass limitations of ESA Long Term -Archive retention time; refer to [this -post](https://luigi.ranghetti.info/post/safe-gcloud/) for details). +**Important**: since November 2023, +Sentinel-2 SAFE archives can be searched and retrieved only from [Google Cloud Sentinel-2 bucket](https://cloud.google.com/storage/docs/public-datasets/sentinel-2); +to use it, **Google Cloud SDK must be installed** and configured following the +[official instructions](https://cloud.google.com/sdk/docs/install). +Refer to [this post](https://luigi.ranghetti.info/post/safe-gcloud/) for details +about how to install configure the required external dependency Google Cloud SDK. +Notice that this mode is not optimal (a modern STAC API approach should be used), +and searching products could be a very slow process. +Nevertheless, the replacement of the old official data source (ESA Hub) with the +new [Copernicus Data Space](https://dataspace.copernicus.eu/analyse/apis) is not +planned (this package is no longer actively maintained due to a career change of the developer). +Anyone who wants to help [can contribute](https://github.com/ranghetti/sen2r/issues/464)). Setting the execution of this processing chain is particularly easy using the \n \n \n \n \n \n NIR<\/mi>\n -<\/mo>\n \n (<\/mo>\n \n \n SWIR1<\/mi>\n -<\/mo>\n SWIR2<\/mi>\n <\/mrow>\n <\/mrow>\n )<\/mo>\n <\/mrow>\n <\/mrow>\n <\/mrow>\n <\/mrow>\n \n \n \n NIR<\/mi>\n +<\/mo>\n \n (<\/mo>\n \n \n SWIR1<\/mi>\n -<\/mo>\n SWIR2<\/mi>\n <\/mrow>\n <\/mrow>\n )<\/mo>\n <\/mrow>\n <\/mrow>\n <\/mrow>\n <\/mrow>\n <\/mfrac>\n <\/mrow>\n<\/math>" } ], - "pkg_version": ["1.5.4.9000"], + "pkg_version": ["1.6.0"], "creation_date": ["2023-05-30 16:07:39.257282"] } diff --git a/man/s2_download.Rd b/man/s2_download.Rd index 483562ff..232ef263 100644 --- a/man/s2_download.Rd +++ b/man/s2_download.Rd @@ -65,9 +65,9 @@ License: GPL 3.0 } \examples{ \dontrun{ -single_s2 <- paste0("https://apihub.copernicus.eu/apihub/odata/v1/", - "Products(\'c7142722-42bf-4f93-b8c5-59fd1792c430\')/$value") -names(single_s2) <- "S2A_MSIL1C_20170613T101031_N0205_R022_T32TQQ_20170613T101608.SAFE" +single_s2 <- paste0("gs://gcp-public-data-sentinel-2/L2/tiles/32/T/NR/", + "S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE/") +names(single_s2) <- "S2B_MSIL2A_20200804T101559_N0214_R065_T32TNR_20200804T145113.SAFE" # (this is equivalent to: # single_s2 <- example_s2_list[1] # where example_s2_list is the output of the example of the @@ -75,15 +75,7 @@ names(single_s2) <- "S2A_MSIL1C_20170613T101031_N0205_R022_T32TQQ_20170613T10160 # Download the whole product s2_download(single_s2, outdir=tempdir()) - -#' # Download the whole product - using aria2 -s2_download(single_s2, outdir=tempdir(), downloader = "aria2") - -# Download more products, ordering the ones stored in the Long Term Archive -pos <- sf::st_sfc(sf::st_point(c(-57.8815,-51.6954)), crs = 4326) -time_window <- as.Date(c("2018-02-21", "2018-03-20")) -list_safe <- s2_list(spatial_extent = pos, time_interval = time_window) -s2_download(list_safe, outdir=tempdir()) +file.info(file.path(tempdir(),names(single_s2))) } } \references{ diff --git a/man/s2_list.Rd b/man/s2_list.Rd index fc7fee9a..0cbb94ee 100644 --- a/man/s2_list.Rd +++ b/man/s2_list.Rd @@ -11,7 +11,7 @@ s2_list( time_interval = c(Sys.Date() - 10, Sys.Date()), time_period = "full", level = "auto", - server = "scihub", + server = "gcloud", apihub = NA, service = "apihub", max_cloud = 100, @@ -48,21 +48,17 @@ product - "L1C": list available level-1C products - "L2A": list available level-2A products} -\item{server}{The servers where archives are searched. -Available options are \code{"scihub"} (ESA Sentinel Hub) and \code{"gcloud"} -(Google Cloud). -Default is \code{"scihub"}, meaning that only ESA Sentinel Hub is considered. -In case of multiple values, they are used in order of priority. -If \code{availability = "check"}, products on LTA are always left as last choice. +\item{server}{(deprecate) Character vector of length 1, with the names of +the servers on which SAFE archives are searched. +Currently, only \code{"gcloud"} (Google Cloud) is supported. +Old \code{"scihub"} (ESA Sentinel Hub) can no more be used, since November 2023, +when the Copernicus Sentinel Data is no longer available and has been +replaced by the Copernicus Data Space Ecosystem. See also the section "Details".} -\item{apihub}{Path of the \code{apihub.txt} file containing credentials -of SciHub account. -If NA (default), the default location inside the package will be used.} +\item{apihub}{\emph{deprecated}} -\item{service}{Character: it can be \code{"dhus"} or \code{"apihub"} (default), -in which cases the required service is forced instead that the one present -in the URLs passed through argument \code{s2_prodlist}.} +\item{service}{\emph{deprecated}} \item{max_cloud}{Integer number (0-100) containing the maximum cloud level of the tiles to be listed (default: no filter).} @@ -72,7 +68,7 @@ to be returned: \itemize{ \item \code{"online"} : only archive names already available for download are returned; \item \code{"lta"}: only archive names stored in the -\href{https://scihub.copernicus.eu/userguide/LongTermArchive}{Long Term Archive} +Long Term Archive are returned; \item \code{"check"}: all archive names are returned, checking if they are available or not for download (see "Value" to know @@ -102,30 +98,11 @@ The function retrieves the list of available Sentinel-2 products satisfying given search criteria. } \details{ -By default, SAFE archives are searched on ESA Sentinel Hub -(argument \code{server = "scihub"}), which is the faster and stable option. -After the reduction of the retention time to 30 days, -it is highly probable that products older then 30 days will not be found -online (see \url{https://github.com/ranghetti/sen2r/issues/408}). -Moreover, after ordering them from Long Term Archive (LTA), in several cases -corrupted archives are obtained -(see \url{https://github.com/ranghetti/sen2r/issues/406}, and refer to this -reference for details about the ESA LTA policy). - -To avoid this problems, the research and download from Google Cloud was -recently implemented. -Users can set \code{server = "gcloud"} to use this data exclusively, or -\verb{server = c("scihub", "gcloud"), availability = "check"} -to search for products available on SciHub first, or on Google Cloud -subsequently. \strong{Important}: to search and download from Google Cloud, Google Cloud SDK must be installed and configured following the indications in \url{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). - -Searching and downloading from Google Cloud is an experimental feature; -in case of bugs, report them at \url{https://github.com/ranghetti/sen2r/issues}. } \note{ License: GPL 3.0 @@ -134,10 +111,10 @@ License: GPL 3.0 \donttest{ 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")) +time_window <- as.Date(c("2020-08-01", "2020-08-11")) # Full-period list -if (is_scihub_configured()) { +if (is_gcloud_configured()) { example_s2_list <- s2_list( spatial_extent = pos, tile = "32TNR", @@ -152,7 +129,7 @@ print(example_s2_list) safe_getMetadata(example_s2_list, "sensing_datetime") # Seasonal-period list -if (is_scihub_configured()) { +if (is_gcloud_configured()) { example_s2_list <- s2_list( spatial_extent = pos, tile = "32TNR", diff --git a/man/s2_order.Rd b/man/s2_order.Rd index 2ae7ea0f..ef66451f 100644 --- a/man/s2_order.Rd +++ b/man/s2_order.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/s2_order.R \name{s2_order} \alias{s2_order} -\title{Order S2 products.} +\title{Order S2 products (deprecated).} \usage{ s2_order( s2_prodlist = NULL, @@ -14,86 +14,21 @@ s2_order( ) } \arguments{ -\item{s2_prodlist}{Named character: list of the products to be ordered, -in the format \code{safelist} (see \linkS4class{safelist}). -Alternatively, it can be the path of a JSON file exported by a previous -execution of \link{s2_order}, in case the user wants, for any reason, to -resubmit the order.} +\item{s2_prodlist}{deprecated} -\item{export_prodlist}{Logical or character: if TRUE (default), -the list of ordered products is saved in a JSON text file, so to be easily -retrievable at a later stage with \link{safe_is_online} or \link{s2_download}; -if FALSE, no output files are generated. -It is also possible to pass the path of an existing folder in which the -JSON file will be saved (otherwise, a default path is used).} +\item{export_prodlist}{deprecated} -\item{delay}{Numeric: time frame (in seconds) to leave between two -consecutive orders. Default is 0.5 seconds: use a higher value if you -encountered errors (i.e. not all the products were correctly ordered).} +\item{delay}{deprecated} -\item{apihub}{Path of the \code{apihub.txt} file containing credentials -of SciHub account. -If NA (default), the default location inside the package will be used.} +\item{apihub}{deprecated} -\item{service}{Character: it can be \code{"dhus"} or \code{"apihub"}, in which cases -the required service is forced instead that the one present in the URLs -passed through argument \code{s2_prodlist}. -If NA (default), the service present in the URLs is maintained.} +\item{service}{deprecated} -\item{reorder}{Logical: If TRUE, and a json file exported by s2_order -is passed as argument to the function, try to order again also -the \code{"available"} and \code{"ordered"} S2 datasets. -Otherwise, only order the \code{"notordered"} ones.} +\item{reorder}{deprecated} } \value{ -A named vector, containing the subset of \code{s2_prodlist} elements -which were ordered. -Moreover, the vector includes the following attributes: -\itemize{ -\item \code{"available"} with the elements of \code{s2_prodlist} which were already -available for download, -\item \code{"notordered"} with the elements of \code{s2_prodlist} which were not ordered -for any reasons, -\item \code{"path"} (only if argument \code{export_prodlist} is not FALSE) with the path -of the json file in which the list of the products (ordered, available -and not ordered) was saved (if \code{export_prodlist = TRUE}). -} +deprecated } \description{ -The function orders S2 products from -\href{https://scihub.copernicus.eu/userguide/LongTermArchive}{Long Term Archive}. -} -\note{ -License: GPL 3.0 -} -\examples{ -\dontrun{ - -# Generate the lists of products -pos <- sf::st_sfc(sf::st_point(c(-57.8815,-51.6954)), crs = 4326) -time_window <- as.Date(c("2019-10-21", "2019-11-20")) -list_safe <- s2_list(spatial_extent = pos, time_interval = time_window) -print(list_safe) -# (at the time the documentation was updated, this list was containing 6 -# archives already available online and 3 stored in the Long Term Archive) - -# Order the products -ordered_prods <- s2_order(list_safe) - -# Check in a second time if the product was made available -(order_path <- attr(ordered_prods, "path")) -safe_is_online(order_path) - -} -} -\references{ -L. Ranghetti, M. Boschetti, F. Nutini, L. Busetto (2020). -"sen2r": An R toolbox for automatically downloading and preprocessing -Sentinel-2 satellite data. \emph{Computers & Geosciences}, 139, 104473. -\doi{10.1016/j.cageo.2020.104473}, URL: \url{https://sen2r.ranghetti.info/}. -} -\author{ -Luigi Ranghetti, phD (2019) - -Lorenzo Busetto, phD (2020) +This function is deprecated and will be removed. } diff --git a/man/safe_is_online.Rd b/man/safe_is_online.Rd index 670fda96..78d5ce62 100644 --- a/man/safe_is_online.Rd +++ b/man/safe_is_online.Rd @@ -2,62 +2,20 @@ % Please edit documentation in R/safe_is_online.R \name{safe_is_online} \alias{safe_is_online} -\title{Check if SAFE is available for download} +\title{Check if SAFE is available for download (deprecated)} \usage{ safe_is_online(s2_prodlist = NULL, apihub = NA, verbose = TRUE) } \arguments{ -\item{s2_prodlist}{Named character: list of the products to be checked, -in the format \code{safelist} (see \linkS4class{safelist}). -Alternatively, it can be the path of a JSON file exported by \link{s2_order}.} +\item{s2_prodlist}{deprecated} -\item{apihub}{Path of the "apihub.txt" file containing credentials -of SciHub account. -If NA (default), the default location inside the package will be used.} +\item{apihub}{deprecated} -\item{verbose}{Logical: if TRUE, provide processing messages summarising -how many of the SAFE archives in \code{s2_prodlist} are available online.} +\item{verbose}{deprecated} } \value{ -A logical vector of the same length and names of the SAFE products -passed with \code{s2_prodlist}, -in which each element is TRUE if the corresponding SAFE archive is -available for download, FALSE if it is not or NA in case of errors with -the SAFE url. +deprecated } \description{ -The function checks if the required SAFE archives are -available for download, or if they have to be ordered from the Long Term -Archive. -} -\note{ -License: GPL 3.0 -} -\examples{ -\donttest{ -if (is_scihub_configured()) { - -# Generate the lists of products -pos <- sf::st_sfc(sf::st_point(c(-57.8815,-51.6954)), crs = 4326) -time_window <- as.Date(c("2018-02-21", "2018-03-20")) -list_safe <- s2_list(spatial_extent = pos, time_interval = time_window) -# (at the time the documentation was written, this list was containing 5 -# archives already available online and 2 stored in the Long Term Archive) - -# Check for availability -safe_is_online(list_safe) - -} -} -} -\references{ -L. Ranghetti, M. Boschetti, F. Nutini, L. Busetto (2020). -"sen2r": An R toolbox for automatically downloading and preprocessing -Sentinel-2 satellite data. \emph{Computers & Geosciences}, 139, 104473. -\doi{10.1016/j.cageo.2020.104473}, URL: \url{https://sen2r.ranghetti.info/}. -} -\author{ -Luigi Ranghetti, phD (2019) - -Lorenzo Busetto, phD (2020) +This function is deprecated and will be removed. } diff --git a/man/scihub_login.Rd b/man/scihub_login.Rd index dbd7b65e..50ed51bf 100644 --- a/man/scihub_login.Rd +++ b/man/scihub_login.Rd @@ -6,7 +6,7 @@ \alias{check_scihub_login} \alias{check_scihub_connection} \alias{write_scihub_login} -\title{Import / export / check SciHub username and password} +\title{Import / export / check SciHub username and password (deprecated)} \usage{ read_scihub_login(apihub_path = NA) @@ -25,82 +25,23 @@ write_scihub_login( ) } \arguments{ -\item{apihub_path}{Path of the file in which login information is saved. -If NA (default) it is automatically read from the package default location.} +\item{apihub_path}{deprecated} -\item{username}{SciHub username.} +\item{username}{deprecated} -\item{password}{SciHub password.} +\item{password}{deprecated} -\item{service}{Character: it can be \code{"dhus"} or \code{"apihub"} (default).} +\item{service}{deprecated} -\item{check}{Logical: if TRUE (default), new credentials are checked -before writing them on \code{apihub_path} (if they are invalid, an error -is provided); -if FALSE, they are directly written.} +\item{check}{deprecated} -\item{append}{Logical: if TRUE, new credentials are added -to the ones existing within \code{apihub_path}; -if FALSE (default), \code{apihub_path} is replaced with the new ones.} +\item{append}{deprecated} } \value{ -\code{read_scihub_login()} returns a matrix of credentials, -in which \code{username} is in the first column, \code{password} in the second. +deprecated -\code{is_scihub_configured()} returns TRUE if credentials can be -accessed, FALSE if not. - -\code{check_scihub_login()} returns TRUE if credentials are valid, -FALSE elsewhere. - -\code{check_scihub_connection()} returns TRUE if internet connection -is available and SciHub is accessible, FALSE otherwise. - -\code{write_scihub_login()} returns NULL. +deprecated } \description{ -\itemize{ -\item \code{read_scihub_login()} reads the SciHub login information; -\item \code{write_scihub_login()} saves new username and password; -\item \code{check_scihub_login()} checks their validity; -\item \code{is_scihub_configured()} check if SciHub credentials are configured. -} - -Login information is stored in a file \code{apihub.txt} inside the -".sen2r" subfolder of the home directory. These functions allow reading -or writing this file, and editing it from the GUI. -In case file \code{apihub.txt} is missing, \code{read_scihub_login()} searches inside -the environmental variables \code{SCIHUB_USER} and \code{SCIHUB_PASSWORD}. -} -\details{ -Notice that new/recently updated SciHub credentials are recognised by API Hub -with a delay of about one week (see \url{https://scihub.copernicus.eu/twiki/do/view/SciHubWebPortal/APIHubDescription} for details). - -For this reason, newly created credentials can not immediately be used by \code{sen2r}, -and password edits on old credentials are not immediately recognised. -} -\note{ -License: GPL 3.0 -} -\examples{ -\donttest{ -is_scihub_configured() -} -\dontrun{ -check_scihub_connection() -check_scihub_login("username", "password") -write_scihub_login("username", "password") -read_scihub_login() -} -} -\references{ -L. Ranghetti, M. Boschetti, F. Nutini, L. Busetto (2020). -"sen2r": An R toolbox for automatically downloading and preprocessing -Sentinel-2 satellite data. \emph{Computers & Geosciences}, 139, 104473. -\doi{10.1016/j.cageo.2020.104473}, URL: \url{https://sen2r.ranghetti.info/}. -} -\author{ -Luigi Ranghetti, phD (2019) - -Lorenzo Busetto, phD (2019) +These functions are deprecated and will be removed. } diff --git a/man/sen2r.Rd b/man/sen2r.Rd index b2b429d4..10735312 100644 --- a/man/sen2r.Rd +++ b/man/sen2r.Rd @@ -11,7 +11,7 @@ sen2r( s2_levels = "l2a", sel_sensor = c("s2a", "s2b"), online = TRUE, - server = "scihub", + server = "gcloud", order_lta = TRUE, apihub = NA, downloader = "builtin", @@ -106,13 +106,12 @@ Accepted values: "s2a" and "s2b"; default: c("s2a","s2b").} products on SciHub and/or Google Cloud (and download if needed); FALSE to work only with already downloaded SAFE products.} -\item{server}{(optional) Character vector of length 1 or 2, with the names of +\item{server}{(deprecate) Character vector of length 1, with the names of the servers on which SAFE archives are searched. -Available options are \code{"scihub"} (ESA Sentinel Hub) and \code{"gcloud"} -(Google Cloud). -Default is \code{"scihub"}, meaning that only ESA Sentinel Hub is considered. -In case of multiple values, they are used in order of priority and -products on LTA are always left as last choice. +Currently, only \code{"gcloud"} (Google Cloud) is supported. +Old \code{"scihub"} (ESA Sentinel Hub) can no more be used, since November 2023, +when the Copernicus Sentinel Data is no longer available and has been +replaced by the Copernicus Data Space Ecosystem. See also the section "Details" of \code{s2_list()}.} \item{order_lta}{(optional) Logical: TRUE (default) to order products from @@ -120,10 +119,7 @@ the Long Term Archive if unavailable for direct download; FALSE to simply skip them (this option has effect only in online mode). It takes effect only if argument \code{server} includes \code{"scihub"}.} -\item{apihub}{Path of the text file containing credentials -of SciHub account. -If NA (default), the default location inside the package will be used. -It takes effect only if argument \code{server} includes \code{"scihub"}.} +\item{apihub}{\emph{deprecated}} \item{downloader}{(optional) Character value corresponding to the executable which should be used to download SAFE products. It could be one among diff --git a/vignettes/sen2r_cmd.Rmd b/vignettes/sen2r_cmd.Rmd index 2ccd0f0c..c87ae3a8 100644 --- a/vignettes/sen2r_cmd.Rmd +++ b/vignettes/sen2r_cmd.Rmd @@ -188,8 +188,7 @@ The processing chain can be re-launched with the command: ``` This is for example particularly useful if a `sen2r()` processing requires -ordering images from the LTA archive -(see https://scihub.copernicus.eu/userguide/LongTermArchive). +ordering images from the LTA archive. The user can in fact, in that case: