View source: R/layer_spatraster.R
layer_spatraster | R Documentation |
tidyterra::geom_spatraster_rgb()
This function is deprecated. Use tidyterra::geom_spatraster_rgb()
for
plot tiles with ggplot2.
layer_spatraster(data, ...)
data |
Deprecated. |
... |
Deprecated |
An error
tidyterra::geom_spatraster_rgb()
.
## Not run:
# Get a SpatRaster
x <- esp_get_ccaa("Galicia", epsg = 3857)
tile <- esp_getTiles(x, "IGNBase.Todo")
class(tile)
library(ggplot2)
# Use tidyterra
library(tidyterra)
ggplot(x) +
geom_spatraster_rgb(data = tile) +
geom_sf(color = "yellow", fill = NA) +
theme_minimal()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.