Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to save high resolution map created with "render_polygons" function #275

Open
datasever opened this issue Mar 23, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@datasever
Copy link

Hello,

Using the plot_3d and render_polygons functions, I created a two-layer map to appear one after the other. The map I created with plot_3d is a population density map. I've added county boundaries under render_polygons. I can save maps that I normally create with plot_3d in high resolution with "render_highquality". but this is a problem in the two-layer map I created. I especially want the 3d map to be high resolution again. how do i do this?

here is my code:

# plotting 3D

try(rgl::close3d())

pop_matrix %>%
  height_shade(texture = texture) %>%
  plot_3d(heightmap = pop_matrix,
          zscale = 250 / 2.5,
          solid = F,
          windowsize = c(1980,1080),
          clear_previous=TRUE)


render_camera(theta = 0,
              phi = 35,
              zoom = 0.4,
              fov = 90)

#We will apply a negative buffer to create space between adjacent polygons. You may 
#have to call `sf::sf_use_s2(FALSE)` before running this code to get it to run.
sf::sf_use_s2(FALSE)
mont_county_buff = sf::st_simplify(sf::st_buffer(tr_admin,-0.003), dTolerance=0.001)

render_camera(theta=10,  phi=20, zoom = 0.85, fov=0)
render_polygons(mont_county_buff, 
                extent = attr(delhi_raster,"extent"), bottom = -650, top=-653,
                color = "#e69c6b",
                parallel=TRUE,clear_previous=TRUE)

And additionally my stackoverflow post

Any help would be appreciated!

@datasever datasever added the enhancement New feature or request label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant