r - Error in get_records() function from the getSpatialData library - Stack Overflow

I am encountering an issue with the get_records() function from the getSpatialData package in R. The er

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742268933a4412329.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信