I added two rasters to QGIS: "site01.tif" and "site02.tif" then added them to a geopackage. When I drag the geopackage into QGIS, the geopackage layers display as expected but the layer names are blank in QGIS' Layer panel. I got the idea that they should just display automatically from watching this video: https://www.youtube.com/watch?v=_KuTfTd9RKc
I used the following to create the geopackage and add the two rasters:
C:\>gdal_translate -co APPEND_SUBDATASET=YES -co RASTER_TABLE=site01 -a_srs EPSG:2258 -of GPKG C:\Users\richard\Desktop\geopackage-temp\site01.tif C:/Users/richard/Desktop/geopackage01.gpkg
Warning 1: TIFFFetchNormalTag:Incompatible type for "RichTIFFIPTC"; tag ignored
Input file size is 26294, 40994
0...10...20...30...40...50...60...70...80...90...100 - done.
C:\>gdal_translate -co APPEND_SUBDATASET=YES -co RASTER_TABLE=site02 -a_srs EPSG:2258 -of GPKG C:\Users\richard\Desktop\geopackage-temp\site02.tif C:/Users/richard/Desktop/geopackage01.gpkg
Warning 1: TIFFFetchNormalTag:Incompatible type for "RichTIFFIPTC"; tag ignored
Input file size is 46713, 44301
0...10...20...30...40...50...60...70...80...90...100 - done.
C:\>gdalinfo C:\Users\richard\Desktop\geopackage01.gpkg
Driver: GPKG/GeoPackage
Files: C:\Users\richard\Desktop\geopackage01.gpkg
Size is 512, 512
Coordinate System is `'
Subdatasets:
SUBDATASET_1_NAME=GPKG:C:\Users\richard\Desktop\geopackage01.gpkg:site01
SUBDATASET_1_DESC=site01 - site01
SUBDATASET_2_NAME=GPKG:C:\Users\richard\Desktop\geopackage01.gpkg:site02
SUBDATASET_2_DESC=site02 - site02
Corner Coordinates:
Upper Left ( 0.0, 0.0)
Lower Left ( 0.0, 512.0)
Upper Right ( 512.0, 0.0)
Lower Right ( 512.0, 512.0)
Center ( 256.0, 256.0)
C:\>
I drag the geopackage into QGIS with no issues however, the layer names are blank in the side panel. In the image below, "site01" and "site02" are the original rasters. The two no-name rasters are the two geopackage layers.:
The layer names are also blank when I drag the geopackage into the project:
I'm expecting to see "site01" and "site02" in the Layers panel for both the original rasters AND the geopackage layers. Instead, the original rasters display their names but the geopackage layers are blank.I'm assuming that the layer name would parse from the RASTER_TABLE.
QGIS 3.6.3
GDAL/OGR 2.4.1
Windows 10 Pro