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.09k stars 2.93k forks source link

QGIS does not show bands of raster with a lot of them #53742

Open latot opened 1 year ago

latot commented 1 year ago

What is the bug or the crash?

Captura desde 2023-07-06 17-37-53

That raster has 5000 bands, but QGIS only shows 3.

QGIS says the raster is already loaded.

With gdalinfo I can see all the bands with no problem.

I'm not saying QGIS right now should be able to show the data of the 5000 bands, but at least show the bands, even if they are disabled.

When the file is open, you can't go to properties of the file, QGIS keeps half-stalled, you can go to menus, but not interact.

Steps to reproduce the issue

You can create any raster with 5000 bands and try to read it! just open the file with QGIS no need for more things.

Driver: GTiff/GeoTIFF
Files: out_d.tif
Size is 1280, 720
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,  720.0)
Upper Right ( 1280.0,    0.0)
Lower Right ( 1280.0,  720.0)
Center      (  640.0,  360.0)
Band 1 Block=1280x1 Type=UInt32, ColorInterp=Gray
Band 2 Block=1280x1 Type=UInt32, ColorInterp=Undefined
....
Band 5000 Block=1280x1 Type=UInt32, ColorInterp=Undefined

Versions

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

Versión de QGIS | 3.32.0-Lima | Rama del código de QGIS | Release 3.32 -- | -- | -- | -- Versión Qt | 5.15.9 Versión de Python | 3.11.4 Versión de GDAL/OGR | 3.7.0 Versión de PROJ | 9.2.1 Versión del registro de base de datos EPSG | v10.088 (2023-05-13) Versión de GEOS | 3.11.0-CAPI-1.17.0 Versión de SQLite | 3.42.0 Versión del cliente de PostgreSQL | unknown Versión de SpatiaLite | 5.0.1 Versión de QWT | 6.1.5 Versión de QScintilla2 | 2.13.3 Versión del SO | Gentoo Linux   |   |   |   Complementos activos de Python grassprovider | 2.12.99 processing | 2.12.99 MetaSearch | 0.3.6 db_manager | 0.1.20 Versión de QGIS 3.32.0-Lima Rama del código de QGIS [Release 3.32](https://github.com/qgis/QGIS/tree/release-3_32) Versión Qt 5.15.9 Versión de Python 3.11.4 Versión de GDAL/OGR 3.7.0 Versión de PROJ 9.2.1 Versión del registro de base de datos EPSG v10.088 (2023-05-13) Versión de GEOS 3.11.0-CAPI-1.17.0 Versión de SQLite 3.42.0 Versión del cliente de PostgreSQL unknown Versión de SpatiaLite 5.0.1 Versión de QWT 6.1.5 Versión de QScintilla2 2.13.3 Versión del SO Gentoo Linux Complementos activos de Python grassprovider 2.12.99 processing 2.12.99 MetaSearch 0.3.6 db_manager 0.1.20 ### Supported QGIS version - [X] I'm running a supported QGIS version according to [the roadmap](https://www.qgis.org/en/site/getinvolved/development/roadmap.html#release-schedule). ### New profile - [ ] I tried with a new [QGIS profile](https://docs.qgis.org/latest/en/docs/user_manual/introduction/qgis_configuration.html#working-with-user-profiles) ### Additional context _No response_
roya0045 commented 1 year ago

How is this a bug? If you want to inspect the bands you can change the symbology, this is just the default behaviour with multiband dataset to display them as RGB.

agiudiceandrea commented 1 year ago

If you want to inspect the bands you can change the symbology

@roya0045, it seems it is not possible, as the user reports that:

I'm not saying QGIS right now should be able to show the data of the 5000 bands, but at least show the bands, even if they are disabled. When the file is open, you can't go to properties of the file, QGIS keeps half-stalled, you can go to menus, but not interact.

roya0045 commented 1 year ago

@agiudiceandrea yeah missed the last line, though it's hard to figure out what is meant without visual about the menu change but no interaction. Could this by done due to calculating band stats and stalling the interface?

Would the Layer Styling panel work fine as a workaround?

alexbruy commented 10 months ago

QGIS does show all bands in the "Symbology" tab of the "Layer Properties" dialog or in the "Layer Styling" panel. In case of raster with such huge number of bands it just takes time to read data and calculate statistics. Things can be improved a bit by calculating statistics with gdalinfo, but this will also take almost the same amount of time as QGIS needs to do it.

I'd say this is a won't fix.

elpaso commented 10 months ago

@alexbruy I'd say this is a bug, QGIS shouldn't just hang while loading the bands, a better implementation could use a separate thread for gathering statistics.

Not an easy fix though.

github-actions[bot] commented 9 months ago

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.