Skip to content
Permalink
Browse files
fixed bugs in saga and grass extent calculation
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@173 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf committed May 8, 2012
1 parent cd2f975 commit 31b48deb86d1a4cef48aac02f2ee3e82382b7714
Showing with 9 additions and 6 deletions.
  1. +2 −3 src/sextante/fusion/FilterData.py
  2. +2 −1 src/sextante/fusion/FusionAlgorithmProvider.py
  3. +4 −1 src/sextante/grass/GrassAlgorithm.py
  4. +1 −1 src/sextante/saga/SagaAlgorithm.py
@@ -1,7 +1,6 @@
import os
from sextante.parameters.ParameterFile import ParameterFile
from sextante.fusion.FusionUtils import FusionUtils
from PyQt4 import QtGui
import subprocess
from sextante.outputs.OutputFile import OutputFile
from sextante.fusion.FusionAlgorithm import FusionAlgorithm
@@ -30,8 +29,8 @@ def processAlgorithm(self, progress):
commands.append("/verbose")
self.addAdvancedModifiersToCommand(commands)
commands.append("outlier")
commands.append(self.getParameterValue(self.VALUE))
commands.append(self.getParameterValue(self.WINDOWSIZE))
commands.append(str(self.getParameterValue(self.VALUE)))
commands.append(str(self.getParameterValue(self.WINDOWSIZE)))
outFile = self.getOutputValue(self.OUTPUT) + ".lda"
commands.append(outFile)
files = self.getParameterValue(self.INPUT).split(";")
@@ -12,14 +12,15 @@
from sextante.fusion.Cover import Cover
from sextante.fusion.FilterData import FilterData
from sextante.fusion.GridMetrics import GridMetrics
from sextante.fusion.GroundFilter import GroundFilter


class FusionAlgorithmProvider(AlgorithmProvider):

def __init__(self):
AlgorithmProvider.__init__(self)
self.actions.append(OpenViewerAction())
self.algsList = [CloudMetrics(), CanopyMaxima(), CanopyModel(), ClipData(), Cover(), FilterData(), GridMetrics()]
self.algsList = [CloudMetrics(), CanopyMaxima(), CanopyModel(), ClipData(), Cover(), FilterData(), GridMetrics(), GroundFilter()]

def initializeSettings(self):
AlgorithmProvider.initializeSettings(self)
@@ -94,6 +94,10 @@ def defineCharacteristicsFromFile(self):
def calculateRegion(self):
auto = SextanteConfig.getSetting(GrassUtils.GRASS_AUTO_REGION)
if auto:
try:
self.cellsize = SextanteConfig.getSetting(GrassUtils.GRASS_REGION_CELLSIZE)
except Exception:
self.cellsize = 0;
first = True;
for param in self.parameters:
if param.value:
@@ -122,7 +126,6 @@ def calculateRegion(self):

def addToRegion(self, layer, first):
if first:
self.cellsize = 0
self.xmin = layer.extent().xMinimum()
self.xmax = layer.extent().xMaximum()
self.ymin = layer.extent().yMinimum()
@@ -106,7 +106,7 @@ def calculateResamplingExtent(self):
self.addToResamplingExtent(layer, first)
first = False
if self.inputExtentsCount < 2:
self.resample = false
self.resample = False
else:
self.xmin = SextanteConfig.getSetting(SagaUtils.SAGA_RESAMPLING_REGION_XMIN)
self.xmax = SextanteConfig.getSetting(SagaUtils.SAGA_RESAMPLING_REGION_XMAX)

0 comments on commit 31b48de

Please sign in to comment.