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
2
votes
1 answer

Get the correct col and row values in a raster matrix from x y UTM values

I'm trying to render a text using the rayshader package function render_label. My raster in WGS84 UTM: localtif = raster::raster("G:\\My Drive\\Dem_12m.tif") Link to download the raster. The elevation matrix: elmat =…
Artur_Indio
  • 736
  • 18
  • 35
1
vote
1 answer

How can I plot 4D results as a surface in R?

I have a model including a three-way interaction term (XYZ). I have used this model to create predictions across the parameter space. Thus, I have four pieces of information to convey: X, Y, Z, and Probability. If I had a simple interaction, I would…
Tess H
  • 25
  • 4
1
vote
2 answers

Add color on height 3D map with Rayshader in R

I want to make 3D map with rayshader. I have seen this web https://www.tylermw.com/3d-ggplots-with-rayshader/ and try the code with my data. In this web, height map has black color but not on my output. Are there any way to get result like that?…
Eriza
  • 25
  • 4
1
vote
1 answer

add 2D image on 3D Plot RGL Device with rayshader in R

I want to add image on 3D plot which is shown on RGL Device. I try add image with annotation_raster() and annotation_custom() but image include be 3D, i expect it be flat. are there code can i use? Thanks.. I try this code but image include 3D, not…
Eriza
  • 25
  • 4
1
vote
0 answers

Rayshader, how to prevent that plot_gg displays edges of polygons

I want to map the amount of inhabitants of the Netherlands in 500x500 m squares with plot_gg from the Rayshader package. Plotting 2D with ggplot works fine but plot_gg shows the edges of every 500x500 m polygon and I cannot find a way to…
Jimmie
  • 11
  • 2
1
vote
1 answer

render_highquality from rayshader R package only rendering black .png image

I'm following this tutorial: https://www.youtube.com/watch?v=zgFXVhmKNbU&lc=Ugxj9Lfa6m7FfLaJlzN4AaABAg.9kn2A9lbmnP9kn2SD5s2vs In the video render_highquality function exports 3d plot successfully as .png image. My code runs fine, everything up until…
Diego Plata
  • 51
  • 1
  • 7
1
vote
1 answer

How to add polygon to 3D Map in r rayshader?

I am new to geo spatial data and just manage to plot in small bits & pieces by looking at few articles on web. I am trying to plot polygon boundaries on the 3D plot which I have built using rayshader package but facing issues with displaying polygon…
ViSa
  • 1,563
  • 8
  • 30
1
vote
0 answers

Cannot generate clouds in Rayshader due to DEM issues?

I'm very new to the R package, rayshader, and have successfully run the entire example script (from the rayshader.com website) using the default DEM. However, I am having trouble with using my own DEM. The only error I am running into in my script…
d1117
  • 11
  • 1
1
vote
0 answers

Plot levitating object in rayshader

I'd like to create sort of levitating objects with rayshader, but I don't know how to do so. Here's an example: test <- structure(list(id = c(1, 2), hauteur = c(10, 20), geometry = structure(list( structure(list(structure(c(-1.36168948095423,…
user46872
  • 11
  • 2
1
vote
1 answer

Problem turning ggplot into 3D graph (using rayshader)

I am trying to turn a ggplot into a 3D plot using the rayshader package. The ggplot is made with geom_raster() and works fine. This is how it looks like: Here is the code for the 2D plot. Although, I think that's not where the core of the problem…
Carlo
  • 135
  • 7
1
vote
0 answers

overlay a raster layer over plot_3d

I am trying to implement this spectacular visualization tool and the only thing that seems to get in the way is to be able of overlapping raster layers over the 3dplot, How could that be possible? I tried add_overlay,but I cannot understand how to…
Agus camacho
  • 868
  • 2
  • 9
  • 24
1
vote
0 answers

Text label with render_label using rayshader for ggplot2 graph

I am trying to label a point in a 3D graph from 2D ggplot graph using rayshader. Here is what I have tried with render_label. I used save_height_matrix = TRUE to get the height matrix. The graph showed the label but in a wrong spot, and it should…
Zhiqiang Wang
  • 6,206
  • 2
  • 13
  • 27
1
vote
1 answer

Rayshader plot_gg crashes while running example

I've tried to reproduce following rayshader example from https://www.tylermw.com/3d-ggplots-with-rayshader/ : library(rayshader) library(ggplot2) library(tidyverse) library(sf) library(viridis) nc = st_read(system.file("shape/nc.shp",…
1
vote
0 answers

Reading an PTM (Polynomial texture mapping) file in Python or R

I have several PTM (Polynomial texture mapping) files that I would like to read in either Python or R for visualisation and computing measurements. I'm not sure how to read these files and would like to work with the X, Y and Z coordinates ideally.…
Bhav Shah
  • 167
  • 3
  • 10
0
votes
0 answers

How can I remove black background from the 3D plot using plot_gg() with Rayshader in R?

I am using the rayshader package in R to render a 3D plot with plot_gg() function. I get a black background in the plot and want to remove it. Here is my code: gg_ma = ggplot(ma_sff) + geom_sf(aes(fill = pro.pop), lwd=0) + geom_sf(data=river3,…
Duc Du
  • 1
  • 1