You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if the result of applying a property filter on gdalcubes::stac_image_collection is empty, a cryptic error message from the underlying C-function occurs. See the reprex below.
library(rstac)
library(gdalcubes)
# AOI bboxbbox= c(
"xmin"=11.14079
, "ymin"=49.75891
, "xmax"=11.14321
, "ymax"=49.76039
)
cloudcover=20# STACs= stac("https://earth-search.aws.element84.com/v0")
# example with Sentinel Collection and period without images that have cloudcover <= 20%items_sen=s|>
stac_search(collections="sentinel-s2-l2a-cogs",
bbox=bbox,
datetime="2021-10-15/2021-10-30",
limit=500) |>
post_request()
collection= stac_image_collection(
items_sen$features,
property_filter=function(x) {x[["eo:cloud_cover"]] <=cloudcover}
)
#> Error in libgdalcubes_create_stac_collection(bands_df, images_df, gdalrefs_df, : Index out of bounds: [index='id'].
By playing around with the threshold for cloud cover we observed that there are simply no collections available within the selected period / AOI and below the cloud cover threshold. We were able to deal with it internally, still I think the message should be somewhat informative to the user.
Thanks,
Hendrik
The text was updated successfully, but these errors were encountered:
Thanks, this is indeed confusing to users. As you suggest, I'll add an informative error message and simply stop the function if there are no items. The alternative to silently return an empty image collection would probably also lead to confusion later when resulting cubes are NA only...
Hi Marius,
if the result of applying a property filter on
gdalcubes::stac_image_collection
is empty, a cryptic error message from the underlying C-function occurs. See the reprex below.Created on 2021-11-03 by the reprex package (v2.0.1)
Session info
By playing around with the threshold for cloud cover we observed that there are simply no collections available within the selected period / AOI and below the cloud cover threshold. We were able to deal with it internally, still I think the message should be somewhat informative to the user.
Thanks,
Hendrik
The text was updated successfully, but these errors were encountered: