library(rstac) library(magrittr) library(terra) s_obj <- stac("https://planetarycomputer.microsoft.com/api/stac/v1/") it_obj <- s_obj %>% stac_search(collections = "landsat-c2-l2", bbox = c(-47.02148, -17.35063, -42.53906, -12.98314)) %>% get_request() print(it_obj) it_obj <- s_obj %>% stac_search(collections = "landsat-c2-l2", bbox = c(-47.02148, -17.35063, -42.53906, -12.98314)) %>% get_request() %>% items_sign(sign_fn = sign_planetary_computer()) url <- paste0("/vsicurl/", it_obj$features[[1]]$assets$blue$href) data <- rast(url) plot(data)