Bug report #8417
incorrect value loaded from netcdf file with scale factor
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||Yes||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||17186|
I have downloaded a large (200+ MB) netcdf file on sea water velocities (from this dataset: http://www.myocean.eu/web/69-myocean-interactive-catalogue.php/?option=com_csw&view=details&product_id=GLOBAL_REANALYSIS_PHYS_001_009 ). After loading the file, QGIS 1.9 does not show the right values.
It seems it does not take into account the scaling factor of "0.001" embedded in the netcdf file (see the attached screenshot of the "ncBrowse" utility). QGIS displays sea water velocities of "117" m/s where the real value is "0.117" m/s.
#5 Updated by Jan David Bendrien over 6 years ago
Here is a second link: https://www.wetransfer.com/downloads/5416cedcb421d89bd06815dbd37cbd6020130806154343/96a8c8
#6 Updated by Giovanni Manghi over 6 years ago
- Status changed from Feedback to Open
not sure, but it seems that gdal should support the scale_factor. Anyway I'll leave the response to the rasters guys.
The wetransfer link should have an expire date, it would be better to have something that allows a download also in the future.
#7 Updated by Jan David Bendrien over 6 years ago
I've uploaded the file to another provider that hosts files for 90 days: https://hotfile.com/dl/238223792/7662375/GLORYS2V1_ORCA025_19930915_R20110216_gridU.nc.html
#8 Updated by René-Luc ReLuc almost 6 years ago
- Target version set to Future Release - High Priority
- % Done changed from 0 to 90
- Status changed from Open to In Progress
I have send a pull-request [RASTER][Feature] Applying scale and offset to raster data - funded by Ifremer
#11 Updated by René-Luc ReLuc over 5 years ago
The pull request https://github.com/qgis/QGIS/pull/1066 has been closedI opened a new one https://github.com/qgis/QGIS/pull/1252
this one integrates reviews from @blazek @wonder-sk @etiennesky and @timlinux :
- integrated and updated the test provided by @etiennesky
- updated the sip API for un-protected method requested by @wonder-sk
- updated the stats method to account for negative scale value
#15 Updated by Ali Yagci over 4 years ago
I believe QGIS shouldn't correct the data for the scale factor. Users can do it on their own by one simple operation. It leads this, see here http://gis.stackexchange.com/questions/158949/pixel-values-beyond-valid-range-in-qgis?noredirect=1#comment235630_158949.