mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
28 lines
1.1 KiB
Python
28 lines
1.1 KiB
Python
import os
|
|
from sextante.lidar.lastools.LasToolsUtils import LasToolsUtils
|
|
from sextante.lidar.lastools.LasToolsAlgorithm import LasToolsAlgorithm
|
|
from sextante.parameters.ParameterFile import ParameterFile
|
|
from sextante.outputs.OutputFile import OutputFile
|
|
|
|
class lasclassify(LasToolsAlgorithm):
|
|
|
|
INPUT = "INPUT"
|
|
OUTPUT = "OUTPUT"
|
|
|
|
def defineCharacteristics(self):
|
|
self.name = "lasclassify"
|
|
self.group = "Tools"
|
|
self.addParameter(ParameterFile(lasclassify.INPUT, "Input las layer"))
|
|
self.addOutput(OutputFile(lasclassify.OUTPUT, "Output classified las file"))
|
|
self.addCommonParameters()
|
|
|
|
def processAlgorithm(self, progress):
|
|
commands = [os.path.join(LasToolsUtils.LasToolsPath(), "bin", "lasclassify.exe")]
|
|
commands.append("-i")
|
|
commands.append(self.getParameterValue(lasclassify.INPUT))
|
|
commands.append("-o")
|
|
commands.append(self.getOutputValue(lasclassify.OUTPUT))
|
|
self.addCommonParameterValuesToCommand(commands)
|
|
|
|
LasToolsUtils.runLasTools(commands, progress)
|