Skip to main content
3 of 3
fix typo
karpfen
  • 2.3k
  • 1
  • 18
  • 34

Adding raster layers to an existing GeoPackage in R

I have a GPKG file with a few vector layers. I have a few processing steps in my script and every now and then a new layer is added to the file. This works fine for vector layers using something like

sf::st_write(vectorlayer, "output.gpkg", "layername", update = TRUE)

but I have no idea how to add raster layers. I can use raster::writeRaster to create a new GPKG, but I'm not able to extend an existing one. Any ideas what I'm missing here?

karpfen
  • 2.3k
  • 1
  • 18
  • 34