Performance considerations for tidyterra
mainBecause tidyterra acts as a user-friendly wrapper around terra to provide tidyverse-style verbs, there is a performance cost compared to using terra directly.
Recommendation:
- Use
terradirectly for maximum speed, especially with very large datasets. - Use
tidyterrawhen your raster has fewer than 10,000,000 data slots. A good rule of thumb is:terra::ncell(your_rast) * terra::nlyr(your_rast) < 1e7.
When plotting rasters, tidyterra performs automatic resampling (similar to terra::plot()). You can control this behavior using the maxcell argument.