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
Raster data is represented by a grid of cells (@sec-raster-data-model), and the number of cells impacts the time to render a map.
Rasters with hundreds of cells are plotted quickly, while rasters with hundreds of millions or billions of cells will take a lot of time (and RAM) to be shown.
<!-- ... some info about screen resolution -->
Therefore, the **tmap** package downsamples large rasters by default to be below 10,000,000 cells in the plot mode and 1,000,000 cells in the view mode.
<!-- c(plot = 1e7, view = 1e6) -->
This values can be adjusted with the `raster.max_cells` argument of `tmap_options()`, which expects a named vector with two elements - `plot` and `view` (@fig-rasterdown).
<!-- btw - downsampling cont vs cat -->
<!-- when and why -->
```{r}
#| label: fig-rasterdown
#| message: false
#| fig-cap: A raster map with the decreased resolution