Closed miguelbar3000 closed 8 months ago
That is strange. The code doesn't use magick package. Is it a dependency for a package?
Hello. Thanks for your script ! Very nice map after a looooooong computing time.
I've had the same issue than @miguelbar3000 but on ubuntu 22.04.
Rstudio asked me the magick package after this command :
elevation_matrix |>
rayshader::height_shade(
texture = colorRampPalette(
c(
"grey90",
"grey60"
)
)(256)
) |>
rayshader::add_overlay(
rayshader::generate_polygon_overlay(
geometry = country_basin_pal,
extent = elevation_raster,
heightmap = elevation_matrix,
linecolor = palette,
palette = palette,
data_column_fill = "HYBAS_ID"
), alphalayer = .6
) |>
rayshader::add_overlay(
rayshader::generate_line_overlay(
geometry = country_river_width,
extent = elevation_raster,
heightmap = elevation_matrix,
color = country_river_width$palette,
linewidth = country_river_width$width,
data_column_width = "width"
),
alphalayer = 1
) |>
rayshader::plot_3d(
elevation_matrix,
zscale = 10,
solid = F,
shadow = F,
windowsize = c(
w / 5, h / 5
),
zoom = .515,
phi = 85,
theta = 0
)
I got this error :
# Error in rayimage::add_image_overlay(hillshade, overlay, alpha = alphalayer, :
# `magick` package required for adding overlay
And for the magick package, it prerequesite to install on ubuntu libmagick++-dev
sudo apt install libmagick++-dev
I had to install the magick package for your code to run on a MacBook. Once installed, everything worked like a charm, although it did take a while for the image to be generated.