Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update GroundFilter.py
  • Loading branch information
spono committed Nov 23, 2015
1 parent c4a6d09 commit 3791ff8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion python/plugins/processing/algs/lidar/fusion/GroundFilter.py
Expand Up @@ -27,6 +27,7 @@

import os
import subprocess
from processing.core.parameters import ParameterBoolean
from processing.core.parameters import ParameterFile
from processing.core.parameters import ParameterNumber
from processing.core.outputs import OutputFile
Expand All @@ -39,6 +40,7 @@ class GroundFilter(FusionAlgorithm):
INPUT = 'INPUT'
OUTPUT = 'OUTPUT'
CELLSIZE = 'CELLSIZE'
SURFACE = 'SURFACE'

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

def processAlgorithm(self, progress):
commands = [os.path.join(FusionUtils.FusionPath(), 'GroundFilter.exe')]
commands.append('/verbose')
self.addAdvancedModifiersToCommand(commands)
surface = self.getParameterValue(self.SURFACE)
if surface:
commands.append('/surface')
outFile = self.getOutputValue(self.OUTPUT)
commands.append(unicode(self.getParameterValue(self.CELLSIZE)))
commands.append(outFile)
commands.append(unicode(self.getParameterValue(self.CELLSIZE)))
files = self.getParameterValue(self.INPUT).split(';')
if len(files) == 1:
commands.append(self.getParameterValue(self.INPUT))
Expand Down

0 comments on commit 3791ff8

Please sign in to comment.