qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.1k stars 2.93k forks source link

Subdatasets support is broken #41414

Closed corrado9999 closed 3 years ago

corrado9999 commented 3 years ago

Describe the bug

When opening a file with subdatasets, QGIS 2 used to show a dialog allowing selecting which ones should be open. Both QGIS 3.4 and 3.10 now show an error message instead: Raster Layer invalid datasource (probably not the exact message, because translated by myself from my localisation). If I create a VirtualRaster by using gdal.Warp from the Python Console in QGIS 3.10 such VRT can be open. The same procedure on QGIS 3.4 fails (it looks like an issue in the embedded GDAL version).

I have first had the issue with Cosmo-SKYMED files, which I cannot share, but I tried also with netCDF files like these.

How to Reproduce

  1. Go to 'Add layer'
  2. Select a file with subdatasets (in my case there were only subdatasets, without a main dataset).
  3. See error -->Raster Layer invalid datasource

QGIS and OS versions

Both on 3.4 and 3.10, on Window 10. Posting only 3.10 detailed information.

Versione di QGIS 3.10.14-A Coruña Revisione codice QGIS 8374282d2a
Compilato con Qt 5.11.2 Esecuzione con Qt 5.11.2
Compilato con GDAL/OGR 3.1.4 Esecuzione con GDAL/OGR 3.1.4
Compilato con GEOS 3.8.1-CAPI-1.13.3 Esecuzione con GEOS 3.8.1-CAPI-1.13.3
Compilato su SQLite 3.29.0 In esecuzione su SQLite 3.29.0
Versione client PostgreSQL 11.5 Versione SpatiaLite 4.3.0
Versione QWT 6.1.3 Versione QScintilla2 2.10.8
Compilato con PROJ 6.3.2 Esecuzione con PROJ Rel. 6.3.2, May 1st, 2020
Versione SO Windows 10 (10.0)
Attiva python plugin profiletool; quick_map_services; db_manager; MetaSearch; processing
gioman commented 3 years ago

@corrado9999 works fine here on QGIS master, please give QGIS 3.16/master a try.

Screenshot_20210208_101426

corrado9999 commented 3 years ago

@gioman you are right, with 3.16 it works. I usually stick to the LTR versions, and I did not find any previous issue on this theme, so I wrongly supposed that it could still affect the latest versions. In few weeks 3.16 should become the new LTR, thus I suppose is not a big issue to migrate now. Sorry for the noise.