TransWikia.com

Decrease memory use deploying web-map with raster layers R Shiny Leaflet

Geographic Information Systems Asked by Maksym Matsala on April 20, 2021

I tried to deploy my web-map with 6 raster layers (60 m resolution each, file size ranges from 400 Kb to 1 Mb) in R shiny leaflet. So the rasters are quite small (initial Landsat 30 m resolution raster did not want to be deployed any way). I had an experience deploying the same 4 rasters on the one map, and it finally worked (when I decreased a resolution to 60 m).

So I have chosen an option ‘large (1 Gb)’ size instance. But my app being successfully deployed instantly closed every time I open it – and having ‘Out of memory‘ error in the Shiny logs.

Everything can be reproduced from my Github. I searched across links on StackOverFlow (like this) and did not find appropriate solutions, unfortunately.

Since raster size is not really large, I suggest that there can be some solution to decrease it through the coding (like opening on the virtual disc or something like that). May be you can notice that another thing in my ui.R and server.R, global.R could consume to much memory. I’ve already tried to deploy it without small pictures, but did not successed.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP