Bug report #20978

QGIS does not display raster maps from a GRASS mapset

Added by Pedro Venâncio almost 6 years ago. Updated over 5 years ago.

Status:Open
Priority:High
Assignee:-
Category:GRASS
Affected QGIS version:3.7(master) Regression?:Yes
Operating System:Windows, Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28797

Description

Raster layers in GRASS mapsets are not rendered by QGIS 3.4.3 and master.

But, at least for some raster data types, just opening the layer properties and doing 'Ok', QGIS assumes a default color ramp and the raster shows up (see the attached gif).

So, it seems that QGIS 3.x is not interpreting GRASS color tables by default.

Using QGIS Value Tool plugin, the raster values are displayed correctly, even without the raster being rendered in canvas.

Veronica Andreo had tested in Linux. Her report is here: http://osgeo-org.1560.x6.nabble.com/QGIS-does-not-display-raster-maps-from-a-GRASS-mapset-td5390774.html

In QGIS 2.18.27, raster layers from GRASS Mapsets work without problems.

I don't know if this behaviour is somehow related, but using GRASS algorithms from QGIS Processing, when the outputs are rasters, the error message 6 from gdal is showed:

ERROR 6: SetColorTable() only supported for Byte or UInt16 bands in TIFF format.

QGIS_GRASS_Color_Table.gif (2.18 MB) Pedro Venâncio, 2019-01-11 06:05 PM

History

#1 Updated by Giovanni Manghi almost 6 years ago

  • Regression? changed from No to Yes

#2 Updated by Alexander Bruy almost 6 years ago

As I understand, ERROR 6 comes from GDAL and caused by limitations of the TIFF format. If GRASS produces rasters with Float data type, then GDAL can't apply color map to them during confersion. Confirmed by Markus Neteler here https://gis.stackexchange.com/a/102605.

#3 Updated by Giovanni Manghi almost 6 years ago

  • Status changed from Open to Feedback

#4 Updated by Giovanni Manghi over 5 years ago

  • Affected QGIS version changed from 3.4.3 to 3.7(master)
  • Status changed from Feedback to Open

Still true on master. On 3.* it fails to render the rasters even when gdal is used is the same as in 2.18 (where there is no issue).

Also available in: Atom PDF