mapme-initiative / mapme.biodiversity

Efficient analysis of spatial biodiversity datasets for global portfolios
https://mapme-initiative.github.io/mapme.biodiversity/
GNU General Public License v3.0
24 stars 7 forks source link

Virtualize tileindex #219

Closed goergen95 closed 6 months ago

goergen95 commented 7 months ago

Instead of writing the tileindex for raster resources to disk (which actually requires reading them from disk for every asset) the tile-indices are now added to a portfolio as an sf object directly. This omits reading from disk, but also requires to run get_resources() for each resource that is required because the add_resource argument to init_portfolio() no longer makes sense. This argument, however, has caused more confusion (see e.g. #91 and #92) than providing benefit so it seems ok to deprecate it.

codecov[bot] commented 7 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (755cd8b) 74.68% compared to head (1363da9) 74.71%.

Files Patch % Lines
R/calc_indicators.R 89.47% 2 Missing :warning:
R/get_resources.R 92.85% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #219 +/- ## ========================================== + Coverage 74.68% 74.71% +0.02% ========================================== Files 43 43 Lines 1833 1815 -18 ========================================== - Hits 1369 1356 -13 + Misses 464 459 -5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

goergen95 commented 6 months ago

Are there any objections to merging this @karpfen and @Jo-Schie?

Jo-Schie commented 6 months ago

I personally think this is the cleaner approach. However I just want to raise the attention that you might need to update the documentation if the tile-index is used somewhere...