27
27
28
28
import os
29
29
import subprocess
30
+ from processing .core .parameters import ParameterBoolean
30
31
from processing .core .parameters import ParameterFile
31
32
from processing .core .parameters import ParameterNumber
32
33
from processing .core .outputs import OutputFile
@@ -39,6 +40,7 @@ class GroundFilter(FusionAlgorithm):
39
40
INPUT = 'INPUT'
40
41
OUTPUT = 'OUTPUT'
41
42
CELLSIZE = 'CELLSIZE'
43
+ SURFACE = 'SURFACE'
42
44
43
45
def defineCharacteristics (self ):
44
46
self .name , self .i18n_name = self .trAlgorithm ('Ground Filter' )
@@ -49,15 +51,20 @@ def defineCharacteristics(self):
49
51
self .tr ('Cellsize for intermediate surfaces' ), 0 , None , 10 ))
50
52
self .addOutput (OutputFile (
51
53
self .OUTPUT , self .tr ('Output ground LAS file' )))
54
+ self .addParameter (ParameterBoolean (
55
+ self .SURFACE , self .tr ('Create .dtm surface' ), False ))
52
56
self .addAdvancedModifiers ()
53
57
54
58
def processAlgorithm (self , progress ):
55
59
commands = [os .path .join (FusionUtils .FusionPath (), 'GroundFilter.exe' )]
56
60
commands .append ('/verbose' )
57
61
self .addAdvancedModifiersToCommand (commands )
62
+ surface = self .getParameterValue (self .SURFACE )
63
+ if surface :
64
+ commands .append ('/surface' )
58
65
outFile = self .getOutputValue (self .OUTPUT )
59
- commands .append (unicode (self .getParameterValue (self .CELLSIZE )))
60
66
commands .append (outFile )
67
+ commands .append (unicode (self .getParameterValue (self .CELLSIZE )))
61
68
files = self .getParameterValue (self .INPUT ).split (';' )
62
69
if len (files ) == 1 :
63
70
commands .append (self .getParameterValue (self .INPUT ))
0 commit comments