Skip to content
Permalink
Browse files

db manager: fix setting of contrast enhancement for spatialite rasters (

fixes #12497)
  • Loading branch information
jef-n committed Apr 4, 2015
1 parent bef4059 commit 8889559366eafcac01223debbac1fde6b86f0879
Showing with 2 additions and 6 deletions.
  1. +2 −6 python/plugins/db_manager/db_plugins/spatialite/plugin.py
@@ -33,8 +33,6 @@
except ImportError:
pass



def classFactory():
return SpatiaLiteDBPlugin

@@ -86,7 +84,6 @@ def __init__(self, connection, uri):
def connectorsFactory(self, uri):
return SpatiaLiteDBConnector(uri)


def dataTablesFactory(self, row, db, schema=None):
return SLTable(row, db, schema)

@@ -96,7 +93,6 @@ def vectorTablesFactory(self, row, db, schema=None):
def rasterTablesFactory(self, row, db, schema=None):
return SLRasterTable(row, db, schema)


def info(self):
from .info_model import SLDatabaseInfo
return SLDatabaseInfo(self)
@@ -224,10 +220,10 @@ def mimeUri(self):
return uri

def toMapLayer(self):
from qgis.core import QgsRasterLayer
from qgis.core import QgsRasterLayer, QgsContrastEnhancement
rl = QgsRasterLayer(self.gdalUri(), self.name)
if rl.isValid():
rl.setContrastEnhancementAlgorithm("StretchToMinimumMaximum")
rl.setContrastEnhancement(QgsContrastEnhancement.StretchToMinimumMaximum)
return rl


0 comments on commit 8889559

Please sign in to comment.
You can’t perform that action at this time.