#Add the included `sf` object with roads to the montereybay dataset
if(run_documentation()) {
water_palette = colorRampPalette(c("darkblue", "dodgerblue", "lightblue"))(200)
bathy_hs = height_shade(montereybay, texture = water_palette)
montereybay %>%
height_shade() %>%
add_overlay(generate_altitude_overlay(bathy_hs, montereybay, 0, 0)) %>%
add_overlay(generate_line_overlay(monterey_roads_sf,
attr(montereybay,"extent"), heightmap = montereybay)) %>%
add_shadow(ray_shade(montereybay,zscale=50),0.3) %>%
plot_map()
}
if(run_documentation()) {
#Change the line width, color, and transparency
montereybay %>%
height_shade() %>%
add_overlay(generate_altitude_overlay(bathy_hs, montereybay, 0, 0)) %>%
add_overlay(generate_line_overlay(monterey_roads_sf, linewidth=3, color="white",
attr(montereybay,"extent"), heightmap = montereybay),
alphalayer=0.8) %>%
add_shadow(ray_shade(montereybay,zscale=50),0.3) %>%
plot_map()
}
if(run_documentation()) {
#Manually specify the width and height to improve visual quality of the lines
montereybay %>%
height_shade() %>%
add_overlay(generate_altitude_overlay(bathy_hs, montereybay, 0, 0)) %>%
add_shadow(ray_shade(montereybay,zscale=50),0.3) %>%
add_overlay(generate_line_overlay(monterey_roads_sf, linewidth=3, color="white",
attr(montereybay,"extent"), width = 1080, height = 1080),
alphalayer=0.8) %>%
plot_map()
}
Run the code above in your browser using DataLab