Skip to content
Permalink
Browse files
Homogenize toMapLayer function definition
  • Loading branch information
nicogodet authored and github-actions committed Nov 7, 2021
1 parent 0ed6309 commit ae0c73394660b0f51650fe6b6e8a24bc233969c4
@@ -308,7 +308,7 @@ def mimeUri(self):
uri = u"raster:gdal:%s:%s" % (self.name, self.uri().database())
return uri

def toMapLayer(self):
def toMapLayer(self, geometryType=None, crs=None):
from qgis.core import QgsRasterLayer, QgsContrastEnhancement

# QGIS has no provider to load rasters, let's use GDAL
@@ -378,7 +378,7 @@ def mimeUri(self):
uri = u"raster:postgresraster:{}:{}".format(self.name, re.sub(":", r"\:", self.uri()))
return uri

def toMapLayer(self):
def toMapLayer(self, geometryType=None, crs=None):
from qgis.core import QgsRasterLayer, QgsContrastEnhancement, QgsDataSourceUri, QgsCredentials

rl = QgsRasterLayer(self.uri(), self.name, "postgresraster")
@@ -192,7 +192,7 @@ def ogrUri(self):
def mimeUri(self):
return Table.mimeUri(self)

def toMapLayer(self):
def toMapLayer(self, geometryType=None, crs=None):
from qgis.core import QgsVectorLayer

provider = self.database().dbplugin().providerName()
@@ -278,7 +278,7 @@ def mimeUri(self):
uri = u"raster:gdal:%s:%s" % (self.name, self.uri().database())
return uri

def toMapLayer(self):
def toMapLayer(self, geometryType=None, crs=None):
from qgis.core import QgsRasterLayer, QgsContrastEnhancement

# QGIS has no provider to load Rasterlite rasters, let's use GDAL
@@ -185,7 +185,7 @@ def refreshTableEstimatedExtent(self):
def runAction(self, action):
return

def toMapLayer(self):
def toMapLayer(self, geometryType=None, crs=None):
return QgsProject.instance().mapLayer(self.geomTableName)


0 comments on commit ae0c733

Please sign in to comment.