Skip to content

Commit 3791ff8

Browse files
committed
Update GroundFilter.py
1 parent c4a6d09 commit 3791ff8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

python/plugins/processing/algs/lidar/fusion/GroundFilter.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import os
2929
import subprocess
30+
from processing.core.parameters import ParameterBoolean
3031
from processing.core.parameters import ParameterFile
3132
from processing.core.parameters import ParameterNumber
3233
from processing.core.outputs import OutputFile
@@ -39,6 +40,7 @@ class GroundFilter(FusionAlgorithm):
3940
INPUT = 'INPUT'
4041
OUTPUT = 'OUTPUT'
4142
CELLSIZE = 'CELLSIZE'
43+
SURFACE = 'SURFACE'
4244

4345
def defineCharacteristics(self):
4446
self.name, self.i18n_name = self.trAlgorithm('Ground Filter')
@@ -49,15 +51,20 @@ def defineCharacteristics(self):
4951
self.tr('Cellsize for intermediate surfaces'), 0, None, 10))
5052
self.addOutput(OutputFile(
5153
self.OUTPUT, self.tr('Output ground LAS file')))
54+
self.addParameter(ParameterBoolean(
55+
self.SURFACE, self.tr('Create .dtm surface'), False))
5256
self.addAdvancedModifiers()
5357

5458
def processAlgorithm(self, progress):
5559
commands = [os.path.join(FusionUtils.FusionPath(), 'GroundFilter.exe')]
5660
commands.append('/verbose')
5761
self.addAdvancedModifiersToCommand(commands)
62+
surface = self.getParameterValue(self.SURFACE)
63+
if surface:
64+
commands.append('/surface')
5865
outFile = self.getOutputValue(self.OUTPUT)
59-
commands.append(unicode(self.getParameterValue(self.CELLSIZE)))
6066
commands.append(outFile)
67+
commands.append(unicode(self.getParameterValue(self.CELLSIZE)))
6168
files = self.getParameterValue(self.INPUT).split(';')
6269
if len(files) == 1:
6370
commands.append(self.getParameterValue(self.INPUT))

0 commit comments

Comments
 (0)