Skip to main content
Tweeted twitter.com/StackGIS/status/1255285670932893702
fix typo
Source Link
karpfen
  • 2.3k
  • 1
  • 18
  • 34

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?

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 create a new GPKG, but I'm not able to extend an existing one. Any ideas what I'm missing here?

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?

Title edit.
Link
TomazicM
  • 27k
  • 24
  • 31
  • 42

How to add Adding raster layers to an existing GeoPackage in R?

Source Link
karpfen
  • 2.3k
  • 1
  • 18
  • 34

How to add 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 create a new GPKG, but I'm not able to extend an existing one. Any ideas what I'm missing here?