Skip to content
Permalink
Browse files
added a new method for loading layers into qgis
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@38 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf@gmail.com committed Mar 12, 2012
1 parent 88ea07f commit b3584dc812e2b4ab0c655eb5040d543ff47a1693
@@ -80,9 +80,9 @@ def load(layer, name = None, crs = None):


@staticmethod
def loadMap(layersmap, crs):
for name in layersmap.keys():
QGisLayers.load(layersmap[name], name, crs)
def loadFromDict(layersdict, crs):
for name in layersdict.keys():
QGisLayers.load(layersdict[name], name, crs)


@staticmethod
@@ -210,6 +210,10 @@ def runalg(name, *args):
def load(layer):
QGisLayers.load(layer)

@staticmethod
def loadFromAlg(layersdict):
QGisLayers.loadFromDict(layersdict)

@staticmethod
def getObject(string):
QGisLayers.getObjectFromUri(string)
@@ -5,6 +5,7 @@
from PyQt4.QtGui import *
from sextante.core.SextanteConfig import SextanteConfig, Setting
from sextante.core.AlgorithmProvider import AlgorithmProvider
from sextante.core.SextanteLog import SextanteLog

class SagaAlgorithmProvider(AlgorithmProvider):

@@ -22,14 +23,14 @@ def __init__(self):
def _loadAlgorithms(self):
folder = SagaUtils.sagaDescriptionPath()
for descriptionFile in os.listdir(folder):
#try:
try:
if descriptionFile.startswith("alg_"):
alg = SagaAlgorithm(os.path.join(folder, descriptionFile))
if alg.name.strip() != "":
alg.provider = self
self.algs.append(alg)
#except Exception,e:
#pass
except Exception,e:
SextanteLog.addToLog(SextanteLog.LOG_ERROR, "Could not open SAGA algorithm: " + descriptionFile)

#self.createDescriptionFiles()

@@ -22,5 +22,6 @@ ParameterBoolean|USER_FIT_EXTENT |Fit Extent|True
ParameterNumber|USER_X_EXTENT_MIN|X-Extent Min|None|None|0
ParameterNumber|USER_X_EXTENT_MAX|X-Extent Max|None|None|0
ParameterNumber|USER_Y_EXTENT_MIN|Y-Extent Min|None|None|0
ParameterNumber|USER_Y_EXTENT_MAX|Y-Extent Max|None|None|0OutputRaster|GRID|Grid
ParameterNumber|USER_Y_EXTENT_MAX|Y-Extent Max|None|None|0
OutputRaster|GRID|Grid
OutputRaster|VARIANCE|Variance

0 comments on commit b3584dc

Please sign in to comment.