satellite-image-classification-r icon indicating copy to clipboard operation
satellite-image-classification-r copied to clipboard

Sentinel data retrieval seems to have changed

Open valentinitnelav opened this issue 1 year ago • 2 comments

Received email:

Hi Valentin,

[...] I tried to run this model to fully understand it. However, the database seems to have changed. I found the codes below cannot run anymore.

records <- getSentinel_query(time_range = c("2017-05-15",
                                            as.character(Sys.Date())), 
                             platform = "Sentinel-2")

It cannot work for the reason is the database website seems incorporated into another platform. This is what I found out now: https://dataspace.copernicus.eu/news/2023-9-28-accessing-sentinel-mission-data-new-copernicus-data-space-ecosystem-apis .

Could you just help me how to get the data for running the codes? My interest is in the model comparison, so if you could just send me the data file, and I can test the code to understand the entire strategy, I would not mind how to download this data file.

Thanks for your help.

valentinitnelav avatar Feb 19 '24 08:02 valentinitnelav

Thanks for your interest in my github repository. It has been a while since I wrote that tutorial and my memory is very fussy, plus I do not have all the raw data as well since it takes some space. However, perhaps have a look in the crop data folder on my repo at https://github.com/valentinitnelav/satellite-image-classification-r/tree/master/data/crop

You can inspect the markdown file https://github.com/valentinitnelav/satellite-image-classification-r/blob/master/index.Rmd and see that I read that prepared crop data with:

# For avoiding long waiting time, read already saved/cached objects
records <- readRDS(file = "./cache/records.rds")
datasets <- readRDS(file = "./cache/datasets.rds")
rst_crop_lst <- lapply(list.files("./data/crop",
                                  pattern = "^B.{2}\\.tif$",
                                  full.names = TRUE),
                       FUN = raster)

(see line 34).

Hope this helps and puts you on the right path. Good luck and lost of energy for your research.

Cheers, Valentin

valentinitnelav avatar Feb 19 '24 08:02 valentinitnelav

I checked the data; however, it did not work. For some reason, the set up cannot install a bunch of packages, some of them have updated or been incorporated to others.

It looks like the code is slowly getting outdated. Package dependency becomes problematic as many update. Unfortunately I do not have the time to keep up with maintaining the code anymore.

I welcome maintenance and bug fixes from the community at this stage.

valentinitnelav avatar Feb 20 '24 09:02 valentinitnelav