Skip to content
Permalink
Browse files

Update GroundFilter.py

  • Loading branch information
spono committed Nov 23, 2015
1 parent c4a6d09 commit 3791ff817304d278ef5dab4124d9c16af8923d61
Showing with 8 additions and 1 deletion.
  1. +8 −1 python/plugins/processing/algs/lidar/fusion/GroundFilter.py
@@ -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
@@ -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')
@@ -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))

0 comments on commit 3791ff8

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