[R-sig-Geo] plot_tiltedmaps isn't showing anything
Nikolaos Tziokas
n|ko@@tz|ok@@ @end|ng |rom gm@||@com
Fri Sep 1 11:25:27 CEST 2023
I am trying to plot 2 raster files but when I am using the *plot_tiltedmaps
*function the plot is empty. I am following the steps in the 2nd tutorial
<https://github.com/marcosci/layer>, called *More advanced example*. Any
ideas why is that?
Here is the code:
# install.packages("remotes")
remotes::install_github("marcosci/layer")
library(layer)
library(terra)
wd <- "path/"
pop = rast(paste0(wd, "pop.tif"))
agbh = rast(paste0(wd, "agbh.tif"))
pop <- tilt_map(pop, y_tilt = 3, x_shift = 25, y_shift = 50, parallel =
TRUE)
agbh <- tilt_map(agbh, y_tilt = 3, x_shift = 50, y_shift = 100, parallel =
TRUE)
map_list <- list(pop, agbh)
plot_tiltedmaps(map_list, palette = c("tofino", "rocket"), direction =
c(-1, 1))
You can download the data from here
<https://drive.google.com/drive/folders/1V115zpdU2-5fXssI6iWv_F6aNu4E5qA7?usp=drive_link>
.
--
Tziokas Nikolaos
Cartographer
Tel:(+44)07561120302
LinkedIn <http://linkedin.com/in/nikolaos-tziokas-896081130>
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list