Day 16 of 30DayMapChallenge : « minimal » (previously).
Bare Réunion…
# devtools::install_github("tylermorganwall/rayshader") library(rayshader) library(raster) library(tidyverse) library(fs) # ftp://BD_ALTI_ext:docoazeecoosh1Ai@ftp3.ign.fr/BDALTIV2_2-0_25M_ASC_RGR92UTM40S-REUN89_D974_2016-03-11.7z # We get a bunch of ASCII files : open and merge, convert to matrix used by rayshader elmat <- dir_ls("~/BDALTIV2_2-0_25M_ASC_RGR92UTM40S-REUN89_D974_2016-03-11/BDALTIV2/1_DONNEES_LIVRAISON_2020-06-00408/BDALTIV2_MNT_25M_ASC_RGR92UTM40S_REUN89_D974/") %>% map(raster) %>% reduce(merge)%>% raster_to_matrix() elmat %>% sphere_shade(texture = "desert") %>% add_shadow(ray_shade(elmat, zscale = 3), 0.5) %>% add_shadow(ambient_shade(elmat), 0) %>% plot_3d(elmat, zscale = 10, fov = 0, theta = 135, zoom = 0.75, phi = 45, windowsize = c(1000, 800)) render_snapshot("~/reunion_3d.jpeg")
