Questions tagged [rayshader]

Create and Visualize Hillshaded Maps from Elevation Matrices

Uses a combination of raytracing, spherical texture mapping, lambertian reflectance, and ambient occlusion to produce 2D and 3D data visualizations and maps. Includes water detection and layering functions, programmable color palette generation, several built-in textures for hill shading, 2D and 3D plotting options, and the ability to export 3D visualizations to a 3D printable format.

62 questions
0
votes
1 answer

RGL: GL Library : Maximum texture size of 1024x1024 exceeded

I keep getting the following error. I'm using the template here https://github.com/Pecners/rayshader_portraits/blob/main/R/portraits/arizona/render_graphic.R Warning messages: 1: In rgl.primitive0(type = "triangles", x = c(-2499, -2498, -2497, : …
0
votes
0 answers

How to plot point data into 3D bars on top of a DEM using ggplot and Rayshader?

I am trying to plot point data on top of a DEM. I want to plot the point data like 3D bars which should lay on top of the DEM, but they just become merged together. The code I am using: DEM <- raster("NRW_dem.tif") dem <- as.data.frame(DEM,…
starski
  • 141
  • 6
0
votes
0 answers

Is it possible to overlay a point layer over a polygon layer over a raster layer in R using Rayshader package?

I have several things that I want to combine into one plot. I have a DEM that I want to use as the base, a polygon layer that I want over the DEM and then a point layer over top of that. The idea is that I want to plot everything using Rayshader so…
starski
  • 141
  • 6
0
votes
0 answers

How to add layer to 3D Map in R rayshader?

I want something like this: to add layers to the bottom of a 3d map and be able to display it in layers one below the other. The first map will be the population density map. The second layer will be a map with the county boundaries visible. I want…
datasever
  • 37
  • 4
0
votes
0 answers

3D map of europe highlighting certain countries

I've been trying to do this 3d map but I cant manage. I get all sorts of errors. # Load required packages library(rayshader) library(rgl) library(sf) # Load the shapefile europe <- st_read("C:/data/NUTS_RG_01M_2021_3035.shp") # Subset the…
MVAC
  • 118
  • 8
0
votes
0 answers

How to downgrade rayshader?

I want to downgrade version rayshader in R. Can anyone tell me how to do it? Thank you. i try this code, but i think i do something wrong. library(remotes) remotes::install_github("tylermorganwall/rayshader", version =…
Eriza
  • 25
  • 4
0
votes
0 answers

Add text based on shape of the map on map 3D (with Rayshader)

i want to add label text on map 3D based on shape the map. the output my expect i use this code nc = st_read(system.file("shape/nc.shp", package="sf"), quiet = TRUE) pts <-…
Eriza
  • 25
  • 4
0
votes
0 answers

Rayshader Generate Polygon Overlay: overlay palette not appearing on 3D map

I'm trying to show soil delineations across a 3D topography using Rayshader. All is well until I go to set the polgyon overlay. Here's where I define the color palette: qual_col_pals <- brewer.pal.info[brewer.pal.info$category == 'qual',] col_vector…
0
votes
2 answers

Rayshader path has offset when plotting a ggplot2 object

I am trying to plot a world map and a path between Berlin and Cancun. So far I managed to plot a world map using library rnaturalearth and convert it to a ggplot2 object which is plotted using rayshader plot_gg function. After that I tried to add a…
Michael
  • 73
  • 5
0
votes
1 answer

Why is the background of my plot black when I use plot_gg() from Rayshader in R

I am trying to represent some point data for a region in 3D using the Rayshader package. It plots everything correctly, except that the background is totally black. How to fix this? Below is my code: base_map <- ggplot(data = df.shp, mapping = aes(x…
starski
  • 141
  • 6
0
votes
0 answers

Plotting geom_sf with rayshader on OSX throws error converting geom to grob

I'd like to plot an R sf object using ggplot2 and the rayshader package on Mac OSX (Ventura, M1 chip). # Load packages library(sf) library(ggplot2) library(rayshader) # Create example data density_data <- data.frame(X=1:5, Y=1:5, Z=1:5) # Convert…
ekstroem
  • 5,957
  • 3
  • 22
  • 48
0
votes
0 answers

Rayshader: Rendered polygons don't align with the surface height

this is my first post and i will try to describe my problem as exactly as i can without writing a novel. Also since english is not my native language please forgive any ambiguities or spelling errors. I am currently trying out the rayshader package…
WiTell
  • 1
  • 1
0
votes
0 answers

Raster to matrix in R returns NA,Rayshader

So i am downloading the elevation data for a shapefile, which i have saved in my pc. But for some reason. I use this shapefile to download the elevation data in R using elevatr package. To plot this elevation data in raysahder,we need this to be…
0
votes
1 answer

Overlaying an image onto Rayshader map so that they are aligned

The below code gets the elevation data for an area in London and the equivalent bing map. I plot the elevation code using rayshader and overlay the bing map however they don't match up. This is because the bing map dimensions don't match the…
Basil
  • 747
  • 7
  • 18
0
votes
0 answers

How to plot polygons in shapefile with z coordinate in 3D using rayshader

I have a .shp file with polygons having z value on every coordinate. I want to represent this shp file in 3d format where I could see the height applied to each polygon in 3D. There is a tool Arcscene which does the same thing but I want to…
user1298426
  • 3,467
  • 15
  • 50
  • 96