Bug report #21783
Error reading netCDF with multiple bands
Status: | Open | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Rasters | ||
Affected QGIS version: | 3.7(master) | Regression?: | Yes |
Operating System: | Windows 10 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 29598 |
Description
I am creating some netCDF files with more than 1 band using GDAL (2.4.1).
The created files (an example file in attachment) works fine in QGIS 2.18 (and other GIS apps), but I get the following errors with QGIS 3+ (ltr, dev, etc.) on OSGEO4W64:
2019-04-07T16:16:16 CRITICAL Invalid Layer : Raster layer Provider is not valid (provider: gdal, URI: C:/gdal.nc 2019-04-07T16:16:16 CRITICAL Invalid Data Source : C:/gdal.nc is not a valid or recognized data source.
If I create a netCDF file with just 1 band (example attached), QGIS 3+ reads the file smoothly.
Related issues
History
#1 Updated by Giovanni Manghi over 5 years ago
- Status changed from Open to Feedback
it works as expected here: when you d&d the 3 band raster on the canvas a dialog shows asking what band you want to load. You must select at least one. If you don't select any band then you gets the error.
#2 Updated by giu mas over 5 years ago
- File qgis-bin_2019-04-09_00-22-03.png added
- Status changed from Feedback to Open
I have attempted the same process (d&d the 3 band raster) on different Windows machines.
The result is always the same error (screenshot attached).
Are you running QGIS as it comes from OSGEO4W64? Or do you have active some dev-specific settings? This would explain why it works on your machine.
#3 Updated by Giovanni Manghi over 5 years ago
- Priority changed from Normal to High
- Status changed from Open to Feedback
giu mas wrote:
I have attempted the same process (d&d the 3 band raster) on different Windows machines.
I tried on Linux (Ubuntu 18.04). You should also do (I can't test on Windows right now), so we can say if the problem is platform dependent.
It could also depend on the version of GDAL being used.
#4 Updated by giu mas over 5 years ago
- Status changed from Feedback to Open
- File osgeolive12_qgis-dev.png added
My Ubuntu 18.04 steps:
- Download the latest OSGeoLive (12) VM.
- Update the software repositories with https://qgis.org/ubuntu-nightly.
- Install QGIS: sudo apt-get install qgis python3-qgis qgis-plugin-grass
- Drag and drop gdal_3bands.nc.
Unfortunately, I got the same error:
#5 Updated by Giovanni Manghi over 5 years ago
- Status changed from Open to Feedback
Unfortunately, I got the same error (attached).
what is the GDAL version used (you see it in the QGIS "about")?
#7 Updated by giu mas over 5 years ago
- Status changed from Feedback to Open
- File osgeo4w64_qgis_about.png added
2.4.0 on Windows
#8 Updated by Jürgen Fischer over 5 years ago
- Description updated (diff)
#9 Updated by Giovanni Manghi over 5 years ago
- Subject changed from Error in reading netCDF with multiple bands to Error in reading netCDF with multiple bands on Windows
Yeah I can see it on Windows... but on Linux definitely works here.
#10 Updated by giu mas over 5 years ago
#11 Updated by Giovanni Manghi over 5 years ago
giu mas wrote:
Mmm... I disagree since it does not work on my OSGeolive VM (I can share the VM with you).
I can download myself if needed.
Furthermore, there are tickets on potentially the same issue:
just saying that on my linux box(es), with that gdal version, it works.
#12 Updated by giu mas over 5 years ago
Giovanni Manghi wrote:
giu mas wrote:
Mmm... I disagree since it does not work on my OSGeolive VM (I can share the VM with you).
I can download myself if needed.
My VM would have the issue that I am talking about. The default OSGeolive has QGSI 2.18, thus I have installed in it QGIS 3-dev (I have described my steps in a previous post.)
Furthermore, there are tickets on potentially the same issue:just saying that on my linux box(es), with that gdal version, it works.
I am only afraid that the title modification implies that the issue has been identified as Windows-only. In reality, there is evidence of the contrary after that I have followed your suggestion to run QGIS 3-dev on Linux.
#13 Updated by Jürgen Fischer over 5 years ago
- Related to Bug report #21822: Cannot load multivariable netcdf files added
#14 Updated by Giovanni Manghi over 5 years ago
- Subject changed from Error in reading netCDF with multiple bands on Windows to Error reading netCDF with multiple bands