-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misreading value from a .grd file created with MapInfo (Vertical Mapper) #20272
Comments
Author Name: Olivier ATHIMON (Olivier ATHIMON) Corruption... QGIS don't show the real value of a pixel for grid named: "Northwood Numeric Grid Format .grd/.tab (*.grd *.GRD)", and used with MapInfo/Vertical Mapper. When I open and read a .grd MapInfo file (created with Vertical Mapper) with QGIS 2.0 or QGIS 2.2, it displays four bands with the real value, not with the next version of QGIS... The 3 first show the RGB values and the fourth gives the value of the matrix, namely the altitude to a vertical file. Inside QGIS (2.7, 2.6.1, 2.6.0 and 2.4), 4th displayed value is a bad value, not the real value. In addition, when making calculations with this file (.grd) and another (for example, a tiff file) QGIS seems to use the real values (not displayed) of the GRID. Then, it gives a good result for calculation... Not with the plugin "Profile Tool"...
|
Author Name: Giovanni Manghi (@gioman) Could you please attach a sample dataset? thanks
|
Author Name: Olivier ATHIMON (Olivier ATHIMON) I attached the sample dataset (used for the previous picture). This morning, i have tried to open it with QGIS 2.6.1 under Debian (Linux)... I have the same problem when i show values with button for information/interrogation => bad value, not real value! I suppose it gives the same problem for calculation.
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Martin Dobias (@wonder-sk) Since QGIS 2.4 there is support for using band offset and scale as reported by GDAL. Indeed the band 4 has offset and scale defined:
So the reported values (e.g. -6.378) seems to be the correct - according to the band's offset/scale. Can we close the bug?
|
Author Name: Olivier ATHIMON (Olivier ATHIMON) No... I am sorry. You can't close the bug. I created a video with a query of a pixel with MapInfo 6.5/Vertical Mapper, MapInfo 12, QGIS 2.2 Valmiera, QGIS 2.6.1 Brighton and QGIS 2.7.0.94 (QGIS b35a596) to show you more the problem... https://www.youtube.com/watch?v=hnIbBdfcWLI&feature=youtu.be I rewrite the text, shown in the video: "the grid: MNT_Lidar_1m_Granges.grd (associated with MNT_Lidar_1m_Granges.tab) 1- Open the grid with MapInfo (version 6.5, a very old version) / Vertical Mapper. 2- Open the grid with MapInfo (version 12, a recent version), without Vertical Mapper 3- Open the grid with QGIS 2.2.0 - Valmiera 4- Open the grid with QGIS 2.6.1 - Brighton 5- Open the grid with QGIS 2.7.0-94 (Master) Use Grid Calculator, select band 4 and save it in GeoTiff. Use "Saveas" in Raw Data (not image) => It is a bad value... from grd file Now, i hope that you understand the problem... Thanks for your job. QGIS is great! |
Author Name: Olivier ATHIMON (Olivier ATHIMON) Hello, I don't know if you have seen the previous video, but i put another here: https://www.youtube.com/watch?v=ZCMV3PyfBc0 to show you the (same) problem with Raster Calculator to do the simple operation to "export" the band 4: "QGIS change the values" of the GEOTIFF result... In reality, QGIS put the RIGHT values in the OUTPUT file (GEOTIFF), where the query button gives a WRONG value (for the input GRD File / Northwood Numeric Grid Format with QGIS from 2.4 to 2.7)... Except for QGIS Master 2.7, this one give 0 value (and wrong value) all over... <= NEW PROBLEM... I add 2 pics of the simple operation realized with the raster calculator... Precision: everything was working with QGIS version 2.2... No misreading (with query button), and good result with raster calculator to save band 4 to a GEOTIFF file. The right value before (in the grd file) and after (in the GEOTIFF/.tiff file) Hope that you will find a solution...
|
Author Name: Martin Dobias (@wonder-sk) Then it looks like a bug in GDAL library - I have reported it here: "GDAL !#15311":http://trac.osgeo.org/gdal/ticket/5839
|
Author Name: Giovanni Manghi (@gioman) Martin Dobias wrote:
then closing this as upstream? |
Author Name: Martin Dobias (@wonder-sk) Fixed in upstream (both GDAL trunk and 1.11 branch)
|
Author Name: Olivier ATHIMON (Olivier ATHIMON) +With a raster dataname: "MNT.grd" with 4 bands (band1 : Red, band2: Green, band3: Blue, band4: altimetry)...+ It had been found that the problem was with the version of GDAL 1.11 ... Ewen Rouault (from GDAL) had after making changes to the GDAL library in Version 1.11.3... [[http://trac.osgeo.org/gdal/ticket/5839]] However, now, I have a doubt (though QGIS integrates GDAL 1.11.2 release)... Indeed, QGIS has seen other changes... Version 2.8 is the successor to version 2.6 with the same problem (read error but problem solved by writing to the raster calculator by exporting the result of the expression: "MNT@4" in GeoTIFF format)... +In version 2.8 of QGIS, the GDAL library was 1.11.2 release. It is also present in version 2.10.
|
Author Name: Olivier ATHIMON (Olivier ATHIMON) With the update of Gdal (in version 1.11.3), the data are effectively OK in QGIS 2.8.3, QGIS 2.10 and QGIS 2.11 (91e1554 for the future QGIS 2.12)...
|
Author Name: Olivier ATHIMON (Olivier ATHIMON)
Original Redmine Issue: 12075
Affected QGIS version: master
Redmine category:rasters
When I read .grd MapInfo file (created with Vertical Mapper) with QGIS 2.0, it displays four bands.
The 3 first show the RGB values and the fourth gives the value of the matrix, namely the altitude to a vertical file.
Inside QGIS 2.7 and 2.6.1 (same problem inside 2.6.0, not tried with QGIS 2.2/2.4), 4th displayed value is changed...
In addition, when making calculations with this file (.grd) and another (for example, a tiff file) QGIS seems to use the real values (not displayed) of the GRID. Then, it gives a good result for calculation.
The text was updated successfully, but these errors were encountered: