pktools 2.6.7
Processing Kernel for geospatial data
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
qgis.pkfilterdem.pkfilterdem Class Reference
Inheritance diagram for qgis.pkfilterdem.pkfilterdem:
Inheritance graph
[legend]
Collaboration diagram for qgis.pkfilterdem.pkfilterdem:
Collaboration graph
[legend]

Public Member Functions

def cliName (self)
 
def defineCharacteristics (self)
 
def processAlgorithm (self, progress)
 
- Public Member Functions inherited from qgis.pktoolsAlgorithm.pktoolsAlgorithm
def getIcon (self)
 
def checkBeforeOpeningParametersDialog (self)
 
def help (self)
 

Public Attributes

 name
 
 group
 

Static Public Attributes

string INPUT = "INPUT"
 
string OUTPUT = "OUTPUT"
 
string DIM = "DIM"
 
string RTYPE = 'RTYPE'
 
list TYPE = ['Float32','Byte','Int16','UInt16','UInt32','Int32','Float64','CInt16','CInt32','CFloat32','CFloat64']
 
list FILTER_OPTIONS = ["promorph"]
 
string FILTER = "FILTER"
 
string EXTRA = 'EXTRA'
 

Detailed Description

Definition at line 39 of file pkfilterdem.py.

Member Function Documentation

◆ cliName()

def qgis.pkfilterdem.pkfilterdem.cliName (   self)

Definition at line 50 of file pkfilterdem.py.

50 def cliName(self):
51 return "pkfilterdem"
52

◆ defineCharacteristics()

def qgis.pkfilterdem.pkfilterdem.defineCharacteristics (   self)

Definition at line 53 of file pkfilterdem.py.

53 def defineCharacteristics(self):
54 self.name = "Create DTM from DEM raster dataset)"
55 self.group = "[pktools] LiDAR"
56
57 self.addParameter(ParameterRaster(self.INPUT, 'Input layer raster data set',ParameterRaster))
58 self.addParameter(ParameterSelection(self.FILTER,"filter",self.FILTER_OPTIONS, 0))
59 self.addParameter(ParameterNumber(self.DIM, "maximum filter kernel size",3,None,17))
60
61 self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
62 self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type', self.TYPE, 0))
63 self.addParameter(ParameterString(self.EXTRA,
64 'Additional parameters', '-of GTiff', optional=True))
65

◆ processAlgorithm()

def qgis.pkfilterdem.pkfilterdem.processAlgorithm (   self,
  progress 
)

Definition at line 66 of file pkfilterdem.py.

66 def processAlgorithm(self, progress):
67 cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
68 commands = [cliPath]
69
70 input=self.getParameterValue(self.INPUT)
71 if input != "":
72 commands.append('-i')
73 commands.append('"' + input + '"')
74
75 filter=self.FILTER_OPTIONS[self.getParameterValue(self.FILTER)]
76 if filter != "none":
77 commands.append("-f")
78 commands.append(filter)
79 if self.getParameterValue(self.DIM) != 0:
80 commands.append("-dim")
81 commands.append(str(self.getParameterValue(self.DIM)))
82
83 if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
84 commands.append('-ot')
85 commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
86 output=self.getOutputValue(self.OUTPUT)
87 if output != "":
88 commands.append("-o")
89 commands.append('"' + output + '"')
90
91 extra = str(self.getParameterValue(self.EXTRA))
92 if len(extra) > 0:
93 commands.append(extra)
94
95 pktoolsUtils.runpktools(commands, progress)

Member Data Documentation

◆ DIM

string qgis.pkfilterdem.pkfilterdem.DIM = "DIM"
static

Definition at line 43 of file pkfilterdem.py.

◆ EXTRA

string qgis.pkfilterdem.pkfilterdem.EXTRA = 'EXTRA'
static

Definition at line 48 of file pkfilterdem.py.

◆ FILTER

string qgis.pkfilterdem.pkfilterdem.FILTER = "FILTER"
static

Definition at line 47 of file pkfilterdem.py.

◆ FILTER_OPTIONS

list qgis.pkfilterdem.pkfilterdem.FILTER_OPTIONS = ["promorph"]
static

Definition at line 46 of file pkfilterdem.py.

◆ group

qgis.pkfilterdem.pkfilterdem.group

Definition at line 55 of file pkfilterdem.py.

◆ INPUT

string qgis.pkfilterdem.pkfilterdem.INPUT = "INPUT"
static

Definition at line 41 of file pkfilterdem.py.

◆ name

qgis.pkfilterdem.pkfilterdem.name

Definition at line 54 of file pkfilterdem.py.

◆ OUTPUT

string qgis.pkfilterdem.pkfilterdem.OUTPUT = "OUTPUT"
static

Definition at line 42 of file pkfilterdem.py.

◆ RTYPE

string qgis.pkfilterdem.pkfilterdem.RTYPE = 'RTYPE'
static

Definition at line 44 of file pkfilterdem.py.

◆ TYPE

list qgis.pkfilterdem.pkfilterdem.TYPE = ['Float32','Byte','Int16','UInt16','UInt32','Int32','Float64','CInt16','CInt32','CFloat32','CFloat64']
static

Definition at line 45 of file pkfilterdem.py.


The documentation for this class was generated from the following file: