最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin4浏览0评论

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.
发布评论

评论列表(0)

  1. 暂无评论