Skip to content

Commit

Permalink
add suffix for dduplicated date times (relevant for s2 images).
Browse files Browse the repository at this point in the history
  • Loading branch information
h-a-graham committed Jan 21, 2025
1 parent 152303f commit ffe5b0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/get_stac_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,10 @@ get_stac_data <- function(aoi,

if (is.null(composite_function)) {
app <- tryCatch(rstac::items_datetime(items), error = function(e) NA)
app <- gsub(":", "", app) # #29, #32
app <- gsub(":", "", app)
if (any(is.na(app))) app <- NULL
app <- app %||% seq_along(download_results)
app <- app %||% as.character(seq_along(download_results))
app <- make.unique(app, sep = "_")

output_filename <- paste0(
tools::file_path_sans_ext(output_filename),
Expand Down

0 comments on commit ffe5b0e

Please sign in to comment.