I know this strays from the preferred "here is my code, here is the specific bug" format of Stack Overflow, but I am trying to be as specific as I can with the knowledge that I have at the moment.
I have some rather larger (~500mb) geoTIFF files that I would like to display on a shiny dashboard. I would like to preserve as much of the original information as possible, without making it agonizingly and prohibitively slow. I was wondering if there was a way to save the rendered map and reload it, instead of having the map be regenerated each time the script was run--this data is static enough that there is no point in re-rendering it multiple times.
Here is a brief demo:
library(leafem)
library(leaflet)
leaflet() %>%
addTiles()%>%
leafem::addGeotiff(
file="map.tif",
)
Ultimately, the leafem::addGeotiff()
term could just as easily be addRasterImage()
if it is possible to save the render, but I have found it to be faster at the moment.
Thanks for any and all help!