rayshader (version 0.11.5)

save_png: Save PNG

Description

Writes the hillshaded map to file.

Usage

save_png(hillshade, filename, rotate = 0, dpi = NULL)

Arguments

hillshade

Array (or matrix) of hillshade to be written.

filename

String with the filename. If `.png` is not at the end of the string, it will be appended automatically.

rotate

Default 0. Rotates the output. Possible values: 0, 90, 180, 270.

dpi

Default `NULL`. Optional DPI (dots per inch) specifying the resolution of the image.

Examples

Run this code
# NOT RUN {
filename_map = tempfile()

#Save the map into `filename_map`
montereybay %>%
 sphere_shade() %>%
 save_png(filename_map)
 
#Rotate the map 180 degrees:

montereybay %>%
 sphere_shade() %>%
 save_png(filename_map,rotate=180)
# }

Run the code above in your browser using DataCamp Workspace