Skip to content

Commit

Permalink
fixed bugs in saga and grass extent calculation
Browse files Browse the repository at this point in the history
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 31b48de
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/sextante/fusion/FilterData.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
Expand Down Expand Up @@ -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(";")
Expand Down
3 changes: 2 additions & 1 deletion src/sextante/fusion/FusionAlgorithmProvider.py
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion src/sextante/grass/GrassAlgorithm.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/sextante/saga/SagaAlgorithm.py
Expand Up @@ -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)
Expand Down

0 comments on commit 31b48de

Please sign in to comment.