I am encountering an issue with the get_records() function from the getSpatialData package in R. The error message states: Argument 'products' must be a character containing at least one element.
It seems that the function requires the products argument to specify which data product (e.g., Sentinel-2, etc.) to query. However, I am unsure which product names are valid or how to structure this argument correctly for my area of interest (AOI) and time range.
Any guidance on setting up the products argument or troubleshooting this error would be greatly appreciated.
# devtools::install_github("16EAGLE/getSpatialData")
library(getSpatialData)
library(sf)
dat <- st_as_sf(st_sfc(st_polygon(list(rbind(c(-58.5, -34.9),
c(-58.3, -34.9),
c(-58.3, -34.6),
c(-58.5, -34.6),
c(-58.5, -34.9))))),
crs = 4326)
print(dat)
login_CopHub(username = "xxxxx", password = "xxxxx")
out <- get_records(collection = "Sentinel-2",
aoi = dat,
time_range = c("2023-04-15", "2023-09-15"),
max_cloud_cov = 20)
Error: Argument 'products' must be a character containing at least one element.