e-sensing / sits

Satellite image time series in R
https://e-sensing.github.io/sitsbook/
GNU General Public License v2.0
470 stars 76 forks source link

Error in mutate_cols(.data, ..., caller_env = caller_env() when running `sits_regularize` #590

Closed kamaulindhardt closed 2 years ago

kamaulindhardt commented 2 years ago

Hi Gilberto and colleagues,

First of all, thank you for all the guidance you have given. I apologise for opening another issue, but I really would like to try and work with the SITS package functionalities.

Last time it was an issue for me that running the sits_regularize() function on my data cube took a really long time. I have wrapped it in a system.time() now, so you can see. However, the main problem is the error(s) I receive at the end of running sits_regularize(). It seems to me there is a problem with the data format..(?).

Let me know if you need any further information, Thank you in advance!

Best regards, Kamau

The cube:

nrb_kenya_cube <- sits_cube(
      source = "AWS",
      collection = "sentinel-s2-l2a-cogs",
      bands = c("B02", "B03", "B04", "B08", "B11", "CLOUD"),
      tiles = "37MBU",
      start_date = "2018-07-01",
      end_date = "2020-09-30")
> class(nrb_kenya_cube)
[1] "aws_cube"    "stac_cube"   "raster_cube"
[4] "sits_cube"   "tbl_df"      "tbl"        
[7] "data.frame" 

Creating a folder for storing the cubes:

# Create 'data' and 'output' folders if they don't already exist
if(!dir.exists(path = 'data_cubes')) {
  dir.create(path = 'data_cubes')
}
if(!dir.exists(path = 'output')) {
  dir.create(path = 'output')
}

data_path <- file.path(".", "data_cubes")

Regularizing the cube to 20m res for a period of 16 days using the least_cc_first method.

# # --- Regularise the nrb_kenya_cube of AOI
system.time(
  nrb_kenya_regular_cube <- sits_regularize(
          cube       = nrb_kenya_cube,
          output_dir = data_path,
          res        = 20,
          period     = "P16D",
          agg_method = "least_cc_first",
          multicores = 6, #  not 6
          multithreads = 1,
          progress = TRUE)
  ) 

The error(s) I recieve are:

|=================================================================================================| 100%
|==============================================================| 100%

Error in `mutate_cols()`:
    ! Problem with `mutate()` column `date`.
ℹ `date = .sits_timeline_date_format(date)`.
x .sits_timeline_date_format: invalid date format '2018-07-19 2' in file name (!is.na(converted_date) is not TRUE)
Caused by error:
    ! .sits_timeline_date_format: invalid date format '2018-07-19 2' in file name (!is.na(converted_date) is not TRUE)
Backtrace:
    1. base::system.time(...)
15. sits:::.sits_timeline_date_format(date)
16. purrr::map_dbl(...)
17. sits .f(.x[[i]], ...)
18. sits:::.check_that(...)
19. base::stop(sprintf(msg, local_msg), call. = FALSE)

system.time : Timing stopped at: 209.8 253.6 6.508e+04

Full error Traceback:

Error in mutate_cols(.data, ..., caller_env = caller_env()) : Caused by error: ! .sits_timeline_date_format: invalid date format '2018-07-19 2' in file name (!is.na(converted_date) is not TRUE)
24.
stop(fallback)
23.
signal_abort(cnd, .file)
22.
abort(bullets, class = c("dplyr:::mutate_error", "dplyr_error"), error_name = error_name, error_expression = error_expression, parent = e, bullets = bullets)
21.
h(simpleError(msg, call))
20.
.handleSimpleError(function (e) { local_call_step(dots = dots, .index = i, .fn = "mutate", .dot_data = inherits(e, "rlang_error_data_pronoun_not_found")) ...
    19.
    stop(sprintf(msg, local_msg), call. = FALSE)
    18.
    .check_that(x = !is.na(converted_date), msg = paste0("invalid date format '", dt, "' in file name"))
    17.
    .f(.x[[i]], ...)
    16.
    purrr::map_dbl(date, function(dt) { if (length(strsplit(dt, "-")[[1]]) == 1) converted_date <- lubridate::fast_strptime(dt, "%Y") else if (length(strsplit(dt, "-")[[1]]) == 2) ...
    15.
    .sits_timeline_date_format(date)
    14.
    mask$eval_all_mutate(quo)
    13.
    withCallingHandlers({ for (i in seq_along(dots)) { mask$across_cache_reset() context_poke("column", old_current_column) ...
        12.
        mutate_cols(.data, ..., caller_env = caller_env())
        11.
        mutate.data.frame(., date = .sits_timeline_date_format(date))
        10.
        dplyr::mutate(., date = .sits_timeline_date_format(date))
        9.
        dplyr::distinct(., tile, band, date, .keep_all = TRUE)
        8.
        dplyr::arrange(., date, band)
        7.
        dplyr::mutate(items, path = paste(data_dir, img_files, sep = "/")) %>% dplyr::select(tile, date, band, path) %>% dplyr::mutate(date = .sits_timeline_date_format(date)) %>% dplyr::distinct(tile, band, date, .keep_all = TRUE) %>% dplyr::arrange(date, band)
        6.
        .local_cube_items_new(data_dir = data_dir, parse_info = parse_info, delim = delim, start_date = start_date, end_date = end_date)
        5.
        .local_cube(source = source, collection = collection, data_dir = data_dir, parse_info = parse_info, delim = delim, bands = bands, start_date = start_date, end_date = end_date, multicores = multicores, progress = progress, ...)
        4.
        sits_cube.local_cube(source = .cube_source(cube), collection = .cube_collection(cube), data_dir = output_dir, parse_info = c("x1", "tile", "band", "date"), multicores = multicores)
        3.
        sits_cube(source = .cube_source(cube), collection = .cube_collection(cube), data_dir = output_dir, parse_info = c("x1", "tile", "band", "date"), multicores = multicores)
        2.
        sits_regularize(cube = nrb_kenya_cube, output_dir = data_path, res = 20, period = "P16D", agg_method = "least_cc_first", multicores = 6, multithreads = 1, progress = TRUE)
        1.
        system.time(nrb_kenya_regular_cube <- sits_regularize(cube = nrb_kenya_cube, output_dir = data_path, res = 20, period = "P16D", agg_method = "least_cc_first", multicores = 6, multithreads = 1, progress = TRUE))
gilbertocamara commented 2 years ago

Dear @kamaulindhardt, many thanks for your interest. Let's try to solve your problems. I ran your script without problems in my machine. Could you please update the R packages you are using? Please also provide us with the output of your sessionInfo() command. Also, which version of sits are you running?

As I said, we are working to update the sits_regularize function and will have a new update coming soon.

kamaulindhardt commented 2 years ago

Good morning/afternoon/evening Gilberto,

Thank you for your understanding and eagerness to help solve my problems. It sounds unexpected to me that you are able to run the script without problems.

Looking forward to the updated sits_regularize.

So far I still get the same error:

|==================================================================================================| 100%
  |=============================================================| 100%
Error in `mutate_cols()`:
! Problem with `mutate()` column `date`.
ℹ `date = .sits_timeline_date_format(date)`.
x .sits_timeline_date_format: invalid date format '2018-07-03 2' in file name (!is.na(converted_date) is not TRUE)
Caused by error:
! .sits_timeline_date_format: invalid date format '2018-07-03 2' in file name (!is.na(converted_date) is not TRUE)
Backtrace:
  1. base::system.time(...)
 15. sits:::.sits_timeline_date_format(date)
 16. purrr::map_dbl(...)
 17. sits .f(.x[[i]], ...)
 18. sits:::.check_that(...)
 19. base::stop(sprintf(msg, local_msg), call. = FALSE)

Timing stopped at: 169 229.6 5.541e+04

You mention that I should update the packages I am using. Could you be more specific? What packages and versions do you suspect to be involved in the issue?

Here are some details you requested:

sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.5.1   stringr_1.4.0   dplyr_1.0.7     purrr_0.3.4     readr_2.0.1     tidyr_1.1.4    
 [7] tibble_3.1.6    ggplot2_3.3.5   tidyverse_1.3.1 rstac_0.9.1-5   sits_0.16.2     pacman_0.5.1   

loaded via a namespace (and not attached):
 [1] fs_1.5.2           sf_1.0-5           usethis_2.0.1      lubridate_1.8.0    devtools_2.4.2    
 [6] httr_1.4.2         rprojroot_2.0.2    tools_4.1.1        backports_1.4.1    utf8_1.2.2        
[11] R6_2.5.1           KernSmooth_2.23-20 DBI_1.1.2          colorspace_2.0-2   withr_2.4.3       
[16] tidyselect_1.1.1   prettyunits_1.1.1  processx_3.5.2     curl_4.3.2         compiler_4.1.1    
[21] cli_3.1.1          rvest_1.0.1        xml2_1.3.2         desc_1.4.0         scales_1.1.1      
[26] classInt_0.4-3     callr_3.7.0        proxy_0.4-26       pkgconfig_2.0.3    sessioninfo_1.1.1 
[31] dbplyr_2.1.1       fastmap_1.1.0      rlang_1.0.0        readxl_1.3.1       rstudioapi_0.13   
[36] generics_0.1.1     jsonlite_1.7.3     magrittr_2.0.2     gdalcubes_0.5.1    Rcpp_1.0.8        
[41] munsell_0.5.0      RcppProgress_0.4.2 fansi_1.0.2        lifecycle_1.0.1    terra_1.5-12      
[46] stringi_1.7.6      yaml_2.2.2         brio_1.1.3         pkgbuild_1.2.0     grid_4.1.1        
[51] parallel_4.1.1     crayon_1.4.2       slider_0.2.2       haven_2.4.3        hms_1.1.0         
[56] knitr_1.37         ps_1.6.0           pillar_1.6.5       codetools_0.2-18   pkgload_1.2.4     
[61] reprex_2.0.1       glue_1.6.1         data.table_1.14.2  remotes_2.4.0.9001 modelr_0.1.8      
[66] vctrs_0.3.8        tzdb_0.1.2         testthat_3.1.2     cellranger_1.1.0   gtable_0.3.0      
[71] assertthat_0.2.1   cachem_1.0.6       xfun_0.29          broom_0.7.9        e1071_1.7-9       
[76] class_7.3-19
  ncdf4_1.19         memoise_2.0.0      warp_0.2.0         units_0.7-2       
[81] ellipsis_0.3.2    

My version of sits:

packageVersion("sits")
[1] ‘0.16.2’

Hope this can help you to pinpoint the issue I'm facing.

In my error I see the message: Error in mutate_cols(.data, ..., caller_env = caller_env()) : Caused by error: ! .sits_timeline_date_format: invalid date format '2018-07-03 2' in file name (!is.na(converted_date) is not TRUE)

Do you have an idea what the meaning of: "invalid date format '2018-07-03 2' in file name" is? Do you think it would help if I specify another period?

Thank you. Best regards, Kamau

OldLipe commented 2 years ago

Dear @kamaulindhardt, thank you for reporting the errors that are occurring in sits_regularize.

The image names generated by the sits_regularize(..) function must follow this pattern:

cube_tile_band_date.tif

Then, following your example:

cube_37MBU_B02_2018-07-03.tif

If this format is changed, the function that recognizes this pattern causes a parse error in the filename.

A simple test to check the filenames can be done by creating a local cube of the generated images. Use the following code to make this test:

if(!dir.exists(path = 'data_cubes')) {
  dir.create(path = 'data_cubes')
}

if(!dir.exists(path = 'output')) {
  dir.create(path = 'output')
}

data_path <- file.path(".", "data_cubes")

nrb_kenya_local_cube <- sits_cube(
    source  = "AWS",
    collection = "SENTINEL-S2-L2A-COGS",
    data_dir = data_path,
    parse_info = c("x1", "tile", "band", "date"),
    multicores = 6, 
    progress = TRUE
) 

If you get an error in the above function, it is probably because the names of the images are different from what the sits_regularize function expects.

If you have any questions, please contact us.

Thank you!

kamaulindhardt commented 2 years ago

Yes @OldLipe,

I got the Error: .local_cube_items_new: no file found in provided directory (length should be >= 1)

Indeed. Good to make sure the data_cubes folder I created is clean.. So I cleaned it up and started again. Now, when running your suggestion I have no problems:

data_path <- file.path(".", "data_cubes")

nrb_kenya_local_cube <- sits_cube(
    source  = "AWS",
    collection = "SENTINEL-S2-L2A-COGS",
    data_dir = data_path,
    parse_info = c("x1", "tile", "band", "date"),
    multicores = 6, 
    progress = TRUE
) 

  |===========================================================================================================| 100%

However, I don't understand this because, as far as I know, I get my sits_cube "nrb_kenya_regular_cube" after running:

# # --- Data cube from AWS of the AOI, Nairobi, central Kenya
nrb_kenya_cube <- sits_cube(
      source = "AWS",
      collection = "sentinel-s2-l2a-cogs",
      bands = c("B02", "B03", "B04", "B08", "B11", "CLOUD"),
      tiles = "37MBU",
      start_date = "2017-07-01",
      end_date = "2019-09-30")

But I do not specify a local output directory for the nrb_kenya_cube, so I don't see how sits_regularize() finds and use the nrb_kenya_cube files?

Is there a way where I am supposed to save my original local cube nrb_kenya_cube somewhere?

For some reason, I now get an error when I try to make my data cube from image collection using sits_cube()

nrb_kenya_cube <- sits_cube(
      source = "AWS",
      collection = "sentinel-s2-l2a-cogs",
      tiles = "37MBU",
      bands = c("B02", "B03", "B04", "B08", "B11", "CLOUD"),
      start_date = "2017-07-01",
      end_date = "2020-09-30",
      progress = TRUE)
Error in if (!purrr::is_null(doc) && doc) progress <- FALSE : missing value where TRUE/FALSE needed
7.
.check_documentation(progress)
6.
.source_items_new.aws_cube(source = source, collection = collection, stac_query = items_query, tiles = tiles, ...)
5.
.source_items_new(source = source, collection = collection, stac_query = items_query, tiles = tiles, ...)
4.
.source_cube.stac_cube(source = source, collection = collection, bands = bands, tiles = tiles, roi_sf = roi, start_date = start_date, end_date = end_date, ...)
3.
.source_cube(source = source, collection = collection, bands = bands, tiles = tiles, roi_sf = roi, start_date = start_date, end_date = end_date, ...)
2.
sits_cube.stac_cube(source = "AWS", collection = "sentinel-s2-l2a-cogs", tiles = "37MBU", bands = c("B02", "B03", "B04", "B08", "B11", "CLOUD"), start_date = "2017-07-01", end_date = "2020-09-30", progress = TRUE)
1.
sits_cube(source = "AWS", collection = "sentinel-s2-l2a-cogs", tiles = "37MBU", bands = c("B02", "B03", "B04", "B08", "B11", "CLOUD"), start_date = "2017-07-01", end_date = "2020-09-30", progress = TRUE)
kamaulindhardt commented 2 years ago

Dear @gilbertocamara and @OldLipe ,

I decided to inspect the sits_cube() function a little and I see that it uses an if statement to understand where the data should go. So I also tried specifying a data_dir folder, like you do in the example of the SITS book. However, I encounter the same error.

sits_cube

function (source, ..., collection, data_dir = NULL) 
{
    .check_set_caller("sits_cube")
    if (purrr::is_null(data_dir)) 
        source <- .source_new(source = source, collection = collection)
    else source <- .source_new(source = source, is_local = TRUE)
    UseMethod("sits_cube", source)
}
<bytecode: 0x7f8a09aa3d98>
<environment: namespace:sits>

Creating a data cube in AWS

s2_cube <- sits_cube(source = "AWS",
                     name = "T20LKP_2018_2019",
                     collection = "sentinel-s2-l2a",
                     tiles = c("20LKP"),
                     start_date = "2018-07-18",
                     end_date = "2018-07-23",
                     bands = c("B02", "B03", "B04", "B08", "B11")
)

Error in if (!purrr::is_null(doc) && doc) progress <- FALSE : missing value where TRUE/FALSE needed

Create a cube based on a stack of CBERS data following the example from the SITS book where a data_dir folder is created with local files.

Which is giving me the same error.

# Create a cube based on a stack of CBERS data
data_dir <- system.file("extdata/CBERS", package = "sitsdata")

# files are named using the convention 
# "CB4_64_16D_STK_022024_2018-08-29_2018-09-13_EVI.tif"
cbers_cube <- sits_cube(
      source = "LOCAL",
      name = "022024",
      origin = "BDC",
      collection = "MOD13Q1-6",
      data_dir = data_dir,
      delim = "_",
      parse_info = c("X1", "X2", "X3", "X4", "tile", "date", "X5", "band")
)

Error in if (!purrr::is_null(doc) && doc) progress <- FALSE : missing value where TRUE/FALSE needed

OldLipe commented 2 years ago

Dear @kamaulindhardt, sorry if I left any open questions in my last answer.

I will try to answer each question in parts, highlighting each one.

But I do not specify a local output directory for the nrb_kenya_cube, so I don't see how sits_regularize() finds and use the nrb_kenya_cube files?

In cubes created by sits, each path is in the file_info attribute of each tile (since the metadata is represented in a tibble/data frame), for example, let's create an AWS cube:

library(sits)

nrb_kenya_cube <- sits_cube(
      source = "AWS",
      collection = "sentinel-s2-l2a-cogs",
      bands = c("B02", "B03", "B04", "B08", "B11", "CLOUD"),
      tiles = "37MBU",
      start_date = "2017-07-01",
      end_date = "2019-09-30")

We can check the paths of each image by accessing the file_info attribute of the nrb_kenya_cube variable, for example:

nrb_kenya_cube$file_info[[1]]

# A tibble: 960 × 4
   date       band    res path                                                  
   <date>     <chr> <int> <chr>                                                 
 1 2017-07-03 B02      10 /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws…
 2 2017-07-03 B03      10 /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws…
 3 2017-07-03 B04      10 /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws…
 4 2017-07-03 B08      10 /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws…
 5 2017-07-03 B11      20 /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws…
 6 2017-07-03 CLOUD    20 /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws…
 7 2017-07-13 B02      10 /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws…
 8 2017-07-13 B03      10 /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws…
 9 2017-07-13 B04      10 /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws…
10 2017-07-13 B08      10 /vsicurl/https://sentinel-cogs.s3.us-west-2.amazonaws…
# … with 950 more rows

Notice that for each band there is a corresponding path. So this cube points to images provided by the AWS STAC service.

The cubes provided by sits are divided into two categories: local and cloud. The local cubes require the user to provide additional parameters such as data_dir, parse_info and progress. These parameters are not needed by cloud cubes, since they refer to images in the cloud and not local.

For some reason, I now get an error when I try to make my data cube from image collection using sits_cube()

This error is present in the development version because we are updating the way the progress parameter is displayed. To avoid this error until we fix it, remove the progress parameter from the function. As follows:

nrb_kenya_cube <- sits_cube(
      source = "AWS",
      collection = "sentinel-s2-l2a-cogs",
      tiles = "37MBU",
      bands = c("B02", "B03", "B04", "B08", "B11", "CLOUD"),
      start_date = "2017-07-01",
      end_date = "2020-09-30")

Creating a data cube in AWS

The code snippet below creates a cube using the sentinel-s2-l2a collection. This is a paid collection and requires the user to enter their AWS secrets to access it. The open data collection refers to sentinel-s2-l2a-cogs.

s2_cube <- sits_cube(source = "AWS",
                     collection = "sentinel-s2-l2a-cogs",
                     tiles = c("20LKP"),
                     start_date = "2018-07-18",
                     end_date = "2018-07-23",
                     bands = c("B02", "B03", "B04", "B08", "B11")
)

Create a cube based on a stack of CBERS data following the example from the SITS book where a data_dir folder is created with local files.

The code snippet is working in version 0.16.2, we suggest that you use the same release version. It can be installed as follows:

library(remotes)

remotes::install_github("e-sensing/sits", "v0.16.2")

If I have left any answers unclear, please feel free to ask.

Thank you!

kamaulindhardt commented 2 years ago

Dear @OldLipe ,

Thanks for your detailed reply! The aspects of the file path are now very clear to me.

Yet, I still run into the same error about "progress". This is despite the fact that I have re-installed the sits package v0.16.2

if (!require("pacman")) install.packages("pacman")
pacman::p_load( #sits,
               rstac,
               purrr,
               tidyverse,
               ggplot2,
               readr)

library(remotes)

remotes::install_github("e-sensing/sits", "v0.16.2")
packageVersion("sits")
[1] ‘0.16.2’

Getting the AWS cube, following your example:

s2_cube <- sits_cube(source = "AWS",
                     collection = "sentinel-s2-l2a-cogs",
                     tiles = c("20LKP"),
                     start_date = "2018-07-18",
                     end_date = "2018-07-23",
                     bands = c("B02", "B03", "B04", "B08", "B11")
)

Error:

Error in if (!purrr::is_null(doc) && doc) progress <- FALSE : missing value where TRUE/FALSE needed

7..check_documentation(progress)
6..source_items_new.aws_cube(source = source, collection = collection, stac_query = items_query, tiles = tiles, ...)
5..source_items_new(source = source, collection = collection, stac_query = items_query, tiles = tiles, ...)
4..source_cube.stac_cube(source = source, collection = collection, bands = bands, tiles = tiles, roi_sf = roi, start_date = start_date, end_date = end_date, ...)
3..source_cube(source = source, collection = collection, bands = bands, tiles = tiles, roi_sf = roi, start_date = start_date, end_date = end_date, ...)
2.sits_cube.stac_cube(source = "AWS", collection = "sentinel-s2-l2a-cogs", tiles = c("20LKP"), start_date = "2018-07-18", end_date = "2018-07-23", bands = c("B02", "B03", "B04", "B08", "B11"))
1.sits_cube(source = "AWS", collection = "sentinel-s2-l2a-cogs", tiles = c("20LKP"), start_date = "2018-07-18", end_date = "2018-07-23", bands = c("B02", "B03", "B04", "B08", "B11"))

..can it be caused by the version of the sits package?

kamaulindhardt commented 2 years ago

I am sorry to add more before your answer @OldLipe.. but now I get a totally different error related to the coordinate reference system:

test_cube <- sits_cube(source = "AWS",
                      collection = "sentinel-s2-l2a-cogs",
                      tiles = c("20LKP","20LLP"),
                      bands = c("B04", "B08", "B11"),
                      start_date = "2018-07-18",
                      end_date = "2019-07-23"
)
Error in if (!is.na(crs[["EPSG"]])) return(c(crs = paste("EPSG", crs[["EPSG"]], : argument is of length zero

12. .raster_crs.terra(assets[[1]])
11. .raster_crs(assets[[1]])
10. fn(x[[i]], ...)
9. FUN(X[[i]], ...)
8. lapply(seq_along(x), function(i) { value <- fn(x[[i]], ...) if (progress) utils::setTxtProgressBar(pb = pb, value = utils::getTxtProgressBar(pb) + ...
7. .sits_parallel_map(seq_len(nrow(data)), function(i) { tile <- data[["tile"]][[i]] fids <- data[["items"]][[i]][["fid"]] features <- data[["items"]][[i]][["features"]] ...
6. .source_items_cube.stac_cube(source = source, items = items, collection = collection, ...)
5. .source_items_cube(source = source, items = items, collection = collection, ...)
4. .source_cube.stac_cube(source = source, collection = collection, bands = bands, tiles = tiles, roi_sf = roi, start_date = start_date, end_date = end_date, ...)
3. .source_cube(source = source, collection = collection, bands = bands, tiles = tiles, roi_sf = roi, start_date = start_date, end_date = end_date, ...)
2. sits_cube.stac_cube(source = "AWS", collection = "sentinel-s2-l2a-cogs", tiles = c("20LKP", "20LLP"), bands = c("B04", "B08", "B11"), start_date = "2018-07-18", end_date = "2019-07-23")
1. sits_cube(source = "AWS", collection = "sentinel-s2-l2a-cogs", tiles = c("20LKP", "20LLP"), bands = c("B04", "B08", "B11"), start_date = "2018-07-18", end_date = "2019-07-23")

sessionInfo()

R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] raster_3.5-15      sp_1.4-6           terra_1.5-17       remotes_2.4.0.9001 forcats_0.5.1      stringr_1.4.0      dplyr_1.0.7       
 [8] readr_2.1.2        tidyr_1.2.0        tibble_3.1.6       ggplot2_3.3.5      tidyverse_1.3.1    purrr_0.3.4        rstac_0.9.1-5     
[15] pacman_0.5.1       sits_0.16.2       

loaded via a namespace (and not attached):
 [1] httr_1.4.2        pkgload_1.2.4     jsonlite_1.7.3    modelr_0.1.8      brio_1.1.3        assertthat_0.2.1  cellranger_1.1.0 
 [8] yaml_2.2.2        sessioninfo_1.1.1 lattice_0.20-44   pillar_1.7.0      backports_1.4.1   glue_1.6.1        digest_0.6.29    
[15] rvest_1.0.1       colorspace_2.0-2  htmltools_0.5.2   pkgconfig_2.0.3   devtools_2.4.2    broom_0.7.12      haven_2.4.3      
[22] scales_1.1.1      processx_3.5.2    tzdb_0.1.2        generics_0.1.2    usethis_2.0.1     ellipsis_0.3.2    cachem_1.0.6     
[29] withr_2.4.3       cli_3.1.1         magrittr_2.0.2    crayon_1.4.2      readxl_1.3.1      memoise_2.0.0     ps_1.6.0         
[36] fs_1.5.2          fansi_1.0.2       xml2_1.3.2        pkgbuild_1.2.0    tools_4.1.1       data.table_1.14.2 prettyunits_1.1.1
[43] hms_1.1.0         lifecycle_1.0.1   munsell_0.5.0     reprex_2.0.1      callr_3.7.0       compiler_4.1.1    rlang_1.0.1      
[50] grid_4.1.1        rstudioapi_0.13   testthat_3.1.2    gtable_0.3.0      codetools_0.2-18  DBI_1.1.2         curl_4.3.2       
[57] R6_2.5.1          lubridate_1.8.0   knitr_1.37        fastmap_1.1.0     utf8_1.2.2        rprojroot_2.0.2   desc_1.4.0       
[64] stringi_1.7.6     Rcpp_1.0.8        vctrs_0.3.8       dbplyr_2.1.1      tidyselect_1.1.1  xfun_0.29  
OldLipe commented 2 years ago

Dear @kamaulindhardt

Sorry for the delay, did you get solved the error in the last message?

Thank you!

kamaulindhardt commented 2 years ago

Dear Felipe @OldLipe,

No, I still haven't managed to solve the issue. Is there a new version update of sits?

OldLipe commented 2 years ago

We have updated the master branch to version 0.16.3, but we haven't yet generated the tag for testing reasons.

You can install with devtools or remotes packages:

devtools::install_github("e-sensing/sits")