Bug report #12497
DB Manager raises python error when loading rasters from a spatialite table
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
Associated revisions
db manager: fix setting of contrast enhancement for spatialite rasters (fixes #12497)
db manager: fix setting of contrast enhancement for spatialite rasters (fixes #12497)
History
#1 Updated by Maximilian Krambach over 9 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 9 years ago
- Status changed from Open to Closed
Fixed in changeset be12c19e669c954d480a1325c6432985ea74e04c.