[GIS] Adding many raster tiles to geopackage

geopackageqgisraster

I have many raster tiles (in tif format, SR WGS84) and, since all together are very heavy, I want to unify them in a geopackage.

I've tried to do that in QGIS, performing the following steps:

  1. converting all the raster in PNG format,
  2. creating a geopackage from the Browser panel (Create Database > No geometry)
  3. simply dragging them into the geopackage created —> Import succesful

but: the original rasters have a single band, while once added to the geopackage they have 4 bands.

Is there a way to create a Geopackage that contains all my raster tiles (about 850 tiles) maintaining only the 1 original band?

Best Answer

Create with your 850 raster tiles a VRT ("Raster" -> "Other" -> "Build Virtual Raster"). Remove the tick from the checkbox "Place each input file into a seperate band". You can leave the other options as they are. Drag & Drop the VRT within QGIS into the Geopackage you prepared - Done

(or rightclick on the VRT, "export as" -> Geopackage )

Related Question