Bug report #12497

DB Manager raises python error when loading rasters from a spatialite table

Added by Martin Jung over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:Giuseppe Sucameli
Category:-
Affected QGIS version:2.8.1 Regression?:No
Operating System:Linux Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:20643

Description

To reproduce:
- QGIS 2.8.1 Wien
- Download example file: https://www.gaia-gis.it/spatialite-2.3.1/truemarble-4km.7z
- Create new spatialite connection
- Try to add the raster to the canvas

Happy Eastern
Martin

screen.png - Error message screenshot (70.6 KB) Martin Jung, 2015-04-01 01:05 PM

Associated revisions

Revision be12c19e
Added by Jürgen Fischer over 5 years ago

db manager: fix setting of contrast enhancement for spatialite rasters (fixes #12497)

Revision 88895593
Added by Jürgen Fischer over 5 years ago

db manager: fix setting of contrast enhancement for spatialite rasters (fixes #12497)

History

#1 Updated by Maximilian Krambach over 5 years ago

The error lies in /usr/share/qgis/python/plugins/db_manager/db_plugins/spatialite/plugin.py line 231, in toMaplayer(self).

Instead of "rl.setContrast…" it should be "rl.renderer().setContrast…";

but still it won't work on multiband rasters (as in the example). They need to have their contrasts set for each Band displayed.

Commenting out the line makes the raster display nicely on (debian)QGIS 2.8.1

#2 Updated by Jürgen Fischer over 5 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF