[ad_1]
I am new to mapdeck and am trying to use its Deck.gl functionality to plot a large (~500mb) .tif file that represents a heatmap/grid. I’m not entirely surprised that a script below doesn’t work, but I don’t know how else to do it:
library(mapdeck)
library(raster)
library(tidyverse)
df <- raster("map.tif")
key <- PUBLIC_KEY
set_token(key)
mapdeck(token = key, style = mapdeck_style('light')) %>%
add_heatmap(data = df)
I get the following error:
Error in resolve_data.default(data, l, c("POINT")) :
mapdeck - This type of data is not supported
Although I am fully aware that the concrete source of this problem is that the Raster* data type is incompatible with mapdeck, I am hoping others would have thoughts or could provide some help in getting this .tif into something usable, whether that be a different file type or a different way of loading it into R. I have tried using gdal_translate
in my command line to convert it to a .xyz file, but it was far too large to be of any practical use.
Thank you in advance!
[ad_2]