e-sensing / sits

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

Bug when trying to retrieve Landsat data from MPC #1232

Open gilbertocamara opened 1 day ago

gilbertocamara commented 1 day ago

Describe the bug I am trying to build a data cube of Landsat data that whose ROI is given by a Sentinel-2 cube. I can create the cube, but I am succeeding to copy the Landsat images to a local directory. Could you please try to reproduce the code below?

To Reproduce

tiles <- c("20LMQ", "20LNQ", "20LMP", "20LNP")

s2_cube <- sits_cube(
  source = "MPC",
  collection = "SENTINEL-2-L2A",
  bands = "B8A",
  tiles = tiles,
  start_date = "2024-07-01",
  end_date = "2024-08-31"
)
bbox_ll <- sits_bbox(s2_cube, as_crs = "EPSG:4326")
l8_cube <- sits_cube(
  source = "MPC",
  collection = "LANDSAT-C2-L2",
  bands = c("BLUE", "GREEN", "RED",  
            "NIR08", "SWIR16", "SWIR22", "CLOUD"),
  roi = bbox_ll,
  start_date = "2015-01-01",
  end_date = "2015-12-31"
)
l8_bands <- sits_bands(l8_cube)
slider::slide_dfr(l8_cube, function(tile){
  for (band in l8_bands){
    l8_local_cube <- sits_cube_copy(
      cube = tile,
      band = band,
      multicores = 1,
      output_dir = "/data/l8_local_cube"
    )
  }
  return(l8_local_cube)
})
Pedrobrito99 commented 1 day ago

Dear @gilbertocamara,

I ran the code in my local environment and an Azure Virtual Machine. I tested it with single and multiple cores, but I was also unable to download the data.

The error message I got is the following:

Caused by error in `.check_remote_errors()`:
! 147 nodes produced errors; first error: HTTP 403 Forbidden.

This error is related to issue #1231

gilbertocamara commented 1 day ago

Thanks @Pedrobrito99!