Skip to content

Commit 9c0ee36

Browse files
committedDec 15, 2015
Merge pull request #2469 from spono/patch-13
[Processing] Update FilterData.py
2 parents 7f3cc35 + 41538e6 commit 9c0ee36

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed
 

‎python/plugins/processing/algs/lidar/fusion/CanopyModel.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
__revision__ = '$Format:%H$'
2929

3030
import os
31+
from processing.core.parameters import ParameterBoolean
3132
from processing.core.parameters import ParameterFile
3233
from processing.core.parameters import ParameterNumber
3334
from processing.core.parameters import ParameterSelection
@@ -65,7 +66,7 @@ def defineCharacteristics(self):
6566
self.addParameter(ParameterSelection(
6667
self.ZUNITS, self.tr('Z Units'), self.UNITS))
6768
self.addOutput(OutputFile(
68-
self.OUTPUT_DTM, self.tr('DTM Output Surface'), 'dtm'))
69+
self.OUTPUT_DTM, self.tr('.dtm output surface'), 'dtm'))
6970
ground = ParameterFile(
7071
self.GROUND, self.tr('Input ground DTM layer'), False, True)
7172
ground.isAdvanced = True

‎python/plugins/processing/algs/lidar/fusion/FilterData.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
__revision__ = '$Format:%H$'
2727

2828
import os
29-
import subprocess
3029
from processing.core.parameters import ParameterFile
3130
from processing.core.parameters import ParameterNumber
3231
from processing.core.outputs import OutputFile
@@ -50,7 +49,7 @@ def defineCharacteristics(self):
5049
self.addParameter(ParameterNumber(
5150
self.VALUE, self.tr('Standard Deviation multiplier')))
5251
self.addParameter(ParameterNumber(
53-
self.VALUE, self.tr('Window size'), None, None, 10))
52+
self.WINDOWSIZE, self.tr('Window size'), None, None, 10))
5453
self.addOutput(OutputFile(
5554
self.OUTPUT, self.tr('Output filtered LAS file')))
5655
self.addAdvancedModifiers()
@@ -59,10 +58,10 @@ def processAlgorithm(self, progress):
5958
commands = [os.path.join(FusionUtils.FusionPath(), 'FilterData.exe')]
6059
commands.append('/verbose')
6160
self.addAdvancedModifiersToCommand(commands)
62-
commands.append('outlier')
61+
commands.append('/outlier')
6362
commands.append(unicode(self.getParameterValue(self.VALUE)))
6463
commands.append(unicode(self.getParameterValue(self.WINDOWSIZE)))
65-
outFile = self.getOutputValue(self.OUTPUT) + '.lda'
64+
outFile = self.getOutputValue(self.OUTPUT)
6665
commands.append(outFile)
6766
files = self.getParameterValue(self.INPUT).split(';')
6867
if len(files) == 1:
@@ -71,8 +70,3 @@ def processAlgorithm(self, progress):
7170
FusionUtils.createFileList(files)
7271
commands.append(FusionUtils.tempFileListFilepath())
7372
FusionUtils.runFusion(commands, progress)
74-
commands = [os.path.join(FusionUtils.FusionPath(), 'LDA2LAS.exe')]
75-
commands.append(outFile)
76-
commands.append(self.getOutputValue(self.OUTPUT))
77-
p = subprocess.Popen(commands, shell=True)
78-
p.wait()

0 commit comments

Comments
 (0)
Please sign in to comment.