Skip to content
Permalink
Browse files

Merge pull request #2469 from spono/patch-13

[Processing] Update FilterData.py
  • Loading branch information
volaya committed Dec 15, 2015
2 parents 7f3cc35 + 41538e6 commit 9c0ee36c49bde6282411e403bf867baf9a35cd99
@@ -28,6 +28,7 @@
__revision__ = '$Format:%H$'

import os
from processing.core.parameters import ParameterBoolean
from processing.core.parameters import ParameterFile
from processing.core.parameters import ParameterNumber
from processing.core.parameters import ParameterSelection
@@ -65,7 +66,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterSelection(
self.ZUNITS, self.tr('Z Units'), self.UNITS))
self.addOutput(OutputFile(
self.OUTPUT_DTM, self.tr('DTM Output Surface'), 'dtm'))
self.OUTPUT_DTM, self.tr('.dtm output surface'), 'dtm'))
ground = ParameterFile(
self.GROUND, self.tr('Input ground DTM layer'), False, True)
ground.isAdvanced = True
@@ -26,7 +26,6 @@
__revision__ = '$Format:%H$'

import os
import subprocess
from processing.core.parameters import ParameterFile
from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputFile
@@ -50,7 +49,7 @@ def defineCharacteristics(self):
self.addParameter(ParameterNumber(
self.VALUE, self.tr('Standard Deviation multiplier')))
self.addParameter(ParameterNumber(
self.VALUE, self.tr('Window size'), None, None, 10))
self.WINDOWSIZE, self.tr('Window size'), None, None, 10))
self.addOutput(OutputFile(
self.OUTPUT, self.tr('Output filtered LAS file')))
self.addAdvancedModifiers()
@@ -59,10 +58,10 @@ def processAlgorithm(self, progress):
commands = [os.path.join(FusionUtils.FusionPath(), 'FilterData.exe')]
commands.append('/verbose')
self.addAdvancedModifiersToCommand(commands)
commands.append('outlier')
commands.append('/outlier')
commands.append(unicode(self.getParameterValue(self.VALUE)))
commands.append(unicode(self.getParameterValue(self.WINDOWSIZE)))
outFile = self.getOutputValue(self.OUTPUT) + '.lda'
outFile = self.getOutputValue(self.OUTPUT)
commands.append(outFile)
files = self.getParameterValue(self.INPUT).split(';')
if len(files) == 1:
@@ -71,8 +70,3 @@ def processAlgorithm(self, progress):
FusionUtils.createFileList(files)
commands.append(FusionUtils.tempFileListFilepath())
FusionUtils.runFusion(commands, progress)
commands = [os.path.join(FusionUtils.FusionPath(), 'LDA2LAS.exe')]
commands.append(outFile)
commands.append(self.getOutputValue(self.OUTPUT))
p = subprocess.Popen(commands, shell=True)
p.wait()

0 comments on commit 9c0ee36

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