| pktools 2.6.7 Processing Kernel for geospatial data

Public Member Functions | Public Attributes | Static Public Attributes | List of all members
qgis.pklas2img.pklas2img Class Reference
Inheritance diagram for qgis.pklas2img.pklas2img:
[legend]
Collaboration diagram for qgis.pklas2img.pklas2img:
[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"
list | ATTRIBUTE_OPTIONS = ["z","intensity", "return", "nreturn"]
list | COMPOSITE_OPTIONS = ["last", "min", "max", "absmin", "absmax", "median", "mean", "sum", "first", "profile", "percentile", "height", "values", "percentile", "number"]
list | FILTER_OPTIONS = ["all","first","last","single","multiple"]
string | ATTRIBUTE = "ATTRIBUTE"
string | COMPOSITE = "COMPOSITE"
string | FILTER = "FILTER"
string | PERCENTILE = "PERCENTILE"
string | DX = "DX"
string | DY = "DY"
string | NODATA = "NODATA"
string | RTYPE = 'RTYPE'
list | TYPE = ['Float32','Byte','Int16','UInt16','UInt32','Int32','Float64','CInt16','CInt32','CFloat32','CFloat64']
string | EXTRA = 'EXTRA'

## Detailed Description

Definition at line 39 of file pklas2img.py.

## Member Function Documentation

## ◆ cliName()

def qgis.pklas2img.pklas2img.cliName | ( |  | self | ) |

Definition at line 60 of file pklas2img.py.

60 def cliName(self):
61 return "pklas2img"
62

## ◆ defineCharacteristics()

def qgis.pklas2img.pklas2img.defineCharacteristics | ( |  | self | ) |

Definition at line 63 of file pklas2img.py.

63 def defineCharacteristics(self):
64 self.name = "Create raster dataset from LAS(Z) data point cloud(s)"
65 self.group = "[pktools] LiDAR"
66
67 self.addParameter(ParameterFile(self.INPUT, "Input LAS(Z) data set(s)", False, False))
68
69 self.addParameter(ParameterSelection(self.ATTRIBUTE,"name of the point attribute to select",self.ATTRIBUTE_OPTIONS, 0))
70 self.addParameter(ParameterSelection(self.COMPOSITE,"composite for multiple points in cell",self.COMPOSITE_OPTIONS, 0))
71 self.addParameter(ParameterSelection(self.FILTER,"filter las points",self.FILTER_OPTIONS, 0))
72 self.addOutput(OutputRaster(self.OUTPUT, "Output raster data set"))
73 self.addParameter(ParameterSelection(self.RTYPE, 'Output raster type', self.TYPE, 0))
74 self.addParameter(ParameterNumber(self.PERCENTILE, "Percentile value used for rule percentile",0.0,100.0,95))
75 self.addParameter(ParameterNumber(self.DX, "Output resolution in x",0.0,None,1.0))
76 self.addParameter(ParameterNumber(self.DY, "Output resolution in y",0.0,None,1.0))
77 # self.addParameter(ParameterExtent(self.PROJWIN,
78 # 'Georeferenced boundingbox'))
79 self.addParameter(ParameterNumber(self.NODATA, "nodata value to put in image",0,None,0))
80 self.addParameter(ParameterString(self.EXTRA,
81 'Additional parameters', '-of GTiff', optional=True))
82

## ◆ processAlgorithm()

def qgis.pklas2img.pklas2img.processAlgorithm | ( |  | self,
|  |  | progress
| ) |  |

Definition at line 83 of file pklas2img.py.

83 def processAlgorithm(self, progress):
84 cliPath = '"' + os.path.join(pktoolsUtils.pktoolsPath(), self.cliName()) + '"'
85 commands = [cliPath]
86
87 input=self.getParameterValue(self.INPUT)
88 inputFiles = input.split(';')
89 for inputFile in inputFiles:
90 commands.append('-i')
91 commands.append('"' + inputFile + '"')
92
93 if self.TYPE[self.getParameterValue(self.RTYPE)] != "none":
94 commands.append('-ot')
95 commands.append(self.TYPE[self.getParameterValue(self.RTYPE)])
96
97 output=self.getOutputValue(self.OUTPUT)
98 if output != "":
99 commands.append("-o")
100 commands.append('"' + output + '"')
101
102 commands.append("-n")
103 commands.append(self.ATTRIBUTE_OPTIONS[self.getParameterValue(self.ATTRIBUTE)])
104 commands.append("-comp")
105 commands.append(self.COMPOSITE_OPTIONS[self.getParameterValue(self.COMPOSITE)])
106 commands.append("-fir")
107 commands.append(self.FILTER_OPTIONS[self.getParameterValue(self.FILTER)])
108 if self.getParameterValue(self.DX) != 0:
109 commands.append("-dx")
110 commands.append(str(self.getParameterValue(self.DX)))
111 if self.getParameterValue(self.DY) != 0:
112 commands.append("-dy")
113 commands.append(str(self.getParameterValue(self.DY)))
114 #projwin = str(self.getParameterValue(self.PROJWIN))
115 # regionCoords = projwin.split(',')
116 # commands.append('-ulx')
117 # commands.append(regionCoords[0])
118 # commands.append('-uly')
119 # commands.append(regionCoords[3])
120 # commands.append('-lrx')
121 # commands.append(regionCoords[1])
122 # commands.append('-lry')
123 # commands.append(regionCoords[2])
124 commands.append('-nodata')
125 commands.append(str(self.getParameterValue(self.NODATA)))
126
127 extra = str(self.getParameterValue(self.EXTRA))
128 if len(extra) > 0:
129 commands.append(extra)
130
131 pktoolsUtils.runpktools(commands, progress)

## Member Data Documentation

## ◆ ATTRIBUTE

string qgis.pklas2img.pklas2img.ATTRIBUTE = "ATTRIBUTE"
| static

Definition at line 47 of file pklas2img.py.

## ◆ ATTRIBUTE_OPTIONS

list qgis.pklas2img.pklas2img.ATTRIBUTE_OPTIONS = ["z","intensity", "return", "nreturn"]
| static

Definition at line 43 of file pklas2img.py.

## ◆ COMPOSITE

string qgis.pklas2img.pklas2img.COMPOSITE = "COMPOSITE"
| static

Definition at line 48 of file pklas2img.py.

## ◆ COMPOSITE_OPTIONS

list qgis.pklas2img.pklas2img.COMPOSITE_OPTIONS = ["last", "min", "max", "absmin", "absmax", "median", "mean", "sum", "first", "profile", "percentile", "height", "values", "percentile", "number"]
| static

Definition at line 44 of file pklas2img.py.

## ◆ DX

string qgis.pklas2img.pklas2img.DX = "DX"
| static

Definition at line 52 of file pklas2img.py.

## ◆ DY

string qgis.pklas2img.pklas2img.DY = "DY"
| static

Definition at line 53 of file pklas2img.py.

## ◆ EXTRA

string qgis.pklas2img.pklas2img.EXTRA = 'EXTRA'
| static

Definition at line 58 of file pklas2img.py.

## ◆ FILTER

string qgis.pklas2img.pklas2img.FILTER = "FILTER"
| static

Definition at line 49 of file pklas2img.py.

## ◆ FILTER_OPTIONS

list qgis.pklas2img.pklas2img.FILTER_OPTIONS = ["all","first","last","single","multiple"]
| static

Definition at line 45 of file pklas2img.py.

## ◆ group

qgis.pklas2img.pklas2img.group

Definition at line 65 of file pklas2img.py.

## ◆ INPUT

string qgis.pklas2img.pklas2img.INPUT = "INPUT"
| static

Definition at line 41 of file pklas2img.py.

## ◆ name

qgis.pklas2img.pklas2img.name

Definition at line 64 of file pklas2img.py.

## ◆ NODATA

string qgis.pklas2img.pklas2img.NODATA = "NODATA"
| static

Definition at line 55 of file pklas2img.py.

## ◆ OUTPUT

string qgis.pklas2img.pklas2img.OUTPUT = "OUTPUT"
| static

Definition at line 42 of file pklas2img.py.

## ◆ PERCENTILE

string qgis.pklas2img.pklas2img.PERCENTILE = "PERCENTILE"
| static

Definition at line 51 of file pklas2img.py.

## ◆ RTYPE

string qgis.pklas2img.pklas2img.RTYPE = 'RTYPE'
| static

Definition at line 56 of file pklas2img.py.

## ◆ TYPE

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

Definition at line 57 of file pklas2img.py.

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

- /tmp/slackdce/slackrepo.NvCr9x/build_pktools/PKTOOLS-2.6.7.6/qgis/pklas2img.py