I encountered a bug when calculating the ESA Landcover indicator for a portfolio that spans multiple tiles and years. The package downloads the correct tifs and builds the tileindex GPKG as expected, but upon reading the tiles within calc_indicators, it selects the wrong ones. Then it reports that the polygons and tiles do not overlap and returns NA rather than the expected landcovers.
However, I was not able to fix it yet. I'm also afraid to break something else in the process, so I'd prefer to look at this together once you're back in business, @goergen95.
I encountered a bug when calculating the ESA Landcover indicator for a portfolio that spans multiple tiles and years. The package downloads the correct tifs and builds the tileindex GPKG as expected, but upon reading the tiles within
calc_indicators
, it selects the wrong ones. Then it reports that the polygons and tiles do not overlap and returnsNA
rather than the expected landcovers.I managed to trace the error back to this code block: https://github.com/mapme-initiative/mapme.biodiversity/blob/babe3d0dab3256c928d8e62cfd687908d3660732/R/calc_indicators.R#L150-L175
However, I was not able to fix it yet. I'm also afraid to break something else in the process, so I'd prefer to look at this together once you're back in business, @goergen95.
Heres a reprex of what I mean:
sessionInfo()