Skip to content

Commit

Permalink
Merge pull request #2469 from spono/patch-13
Browse files Browse the repository at this point in the history
[Processing] Update FilterData.py
  • Loading branch information
volaya committed Dec 15, 2015
2 parents 7f3cc35 + 41538e6 commit 9c0ee36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
3 changes: 2 additions & 1 deletion python/plugins/processing/algs/lidar/fusion/CanopyModel.py
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 3 additions & 9 deletions python/plugins/processing/algs/lidar/fusion/FilterData.py
Expand Up @@ -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
Expand All @@ -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()
Expand All @@ -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:
Expand All @@ -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.