| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| blast2dem.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from PyQt4 import QtGui | ||
|
|
||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterString import ParameterString | ||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterSelection import ParameterSelection | ||
|
|
||
| class blast2dem(LAStoolsAlgorithm): | ||
|
|
||
| ATTRIBUTE = "ATTRIBUTE" | ||
| PRODUCT = "PRODUCT" | ||
| ATTRIBUTES = ["elevation", "slope", "intensity", "rgb"] | ||
| PRODUCTS = ["actual values", "hillshade", "gray", "false"] | ||
|
|
||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "blast2dem" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParametersFilter1ReturnClassFlagsGUI() | ||
| self.addParametersStepGUI() | ||
| self.addParameter(ParameterSelection(blast2dem.ATTRIBUTE, "Attribute", blast2dem.ATTRIBUTES, 0)) | ||
| self.addParameter(ParameterSelection(blast2dem.PRODUCT, "Product", blast2dem.PRODUCTS, 0)) | ||
| self.addParametersRasterOutputGUI() | ||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "blast2dem.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| self.addParametersFilter1ReturnClassFlagsCommands(commands) | ||
| self.addParametersStepCommands(commands) | ||
| attribute = self.getParameterValue(blast2dem.ATTRIBUTE) | ||
| if attribute != 0: | ||
| commands.append("-" + blast2dem.ATTRIBUTES[attribute]) | ||
| product = self.getParameterValue(blast2dem.PRODUCT) | ||
| if product != 0: | ||
| commands.append("-" + blast2dem.PRODUCTS[product]) | ||
| self.addParametersRasterOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| blast2iso.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterNumber import ParameterNumber | ||
|
|
||
| class blast2iso(LAStoolsAlgorithm): | ||
|
|
||
| SMOOTH = "SMOOTH" | ||
| ISO_EVERY = "ISO_EVERY" | ||
| SIMPLIFY_LENGTH = "SIMPLIFY_LENGTH" | ||
| SIMPLIFY_AREA = "SIMPLIFY_AREA" | ||
| CLEAN = "CLEAN" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "blast2iso" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParameter(ParameterNumber(blast2iso.SMOOTH, "smooth underlying TIN", 0, None, 0)) | ||
| self.addParameter(ParameterNumber(blast2iso.ISO_EVERY, "extract isoline with a spacing of", 0, None, 10.0)) | ||
| self.addParameter(ParameterNumber(blast2iso.CLEAN, "clean isolines shorter than (0 = do not clean)", None, None, 0.0)) | ||
| self.addParameter(ParameterNumber(blast2iso.SIMPLIFY_LENGTH, "simplify segments shorter than (0 = do not simplify)", None, None, 0.0)) | ||
| self.addParameter(ParameterNumber(blast2iso.SIMPLIFY_AREA, "simplify segments pairs with area less than (0 = do not simplify)", None, None, 0.0)) | ||
| self.addParametersVectorOutputGUI() | ||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "blast2iso.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| smooth = self.getParameterValue(blast2iso.SMOOTH) | ||
| if smooth != 0: | ||
| commands.append("-smooth") | ||
| commands.append(str(smooth)) | ||
| commands.append("-iso_every") | ||
| commands.append(str(self.getParameterValue(blast2iso.ISO_EVERY))) | ||
| simplify_length = self.getParameterValue(blast2iso.SIMPLIFY_LENGTH) | ||
| if simplify_length != 0: | ||
| commands.append("-simplify_length") | ||
| commands.append(str(simplify_length)) | ||
| simplify_area = self.getParameterValue(blast2iso.SIMPLIFY_AREA) | ||
| if simplify_area != 0: | ||
| commands.append("-simplify_area") | ||
| commands.append(str(simplify_area)) | ||
| clean = self.getParameterValue(blast2iso.CLEAN) | ||
| if clean != 0: | ||
| commands.append("-clean") | ||
| commands.append(str(clean)) | ||
| self.addParametersVectorOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| las2las.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterNumber import ParameterNumber | ||
| from processing.parameters.ParameterString import ParameterString | ||
| from processing.parameters.ParameterSelection import ParameterSelection | ||
|
|
||
| class las2las(LAStoolsAlgorithm): | ||
|
|
||
| STEP = "STEP" | ||
| OPERATION = "OPERATION" | ||
| OPERATIONS = ["---", "set_point_type", "set_point_size", "set_version_minor", "set_version_major", "start_at_point", "stop_at_point", "remove_vlr", "auto_reoffset", "week_to_adjusted", "adjusted_to_week", "scale_rgb_up", "scale_rgb_down", "remove_all_vlrs", "remove_extra", "clip_to_bounding_box"] | ||
| OPERATIONARG = "OPERATIONARG" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "las2las" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParametersFilter1ReturnClassFlagsGUI() | ||
| self.addParametersFilter1CoordsIntensityGUI() | ||
| self.addParameter(ParameterSelection(las2las.OPERATION, "operations (first 7 need an argument)", las2las.OPERATIONS, 0)) | ||
| self.addParameter(ParameterString(las2las.OPERATIONARG, "argument for operation")) | ||
| self.addParametersPointOutputGUI() | ||
|
|
||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "las2las.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| self.addParametersFilter1ReturnClassFlagsCommands(commands) | ||
| self.addParametersFilter1CoordsIntensityCommands(commands) | ||
| operation = self.getParameterValue(las2las.OPERATION) | ||
| if operation != 0: | ||
| commands.append("-" + OPERATIONS[operation]) | ||
| if operation > 7: | ||
| commands.append(self.getParameterValue(las2las.OPERATIONARG)) | ||
|
|
||
| self.addParametersPointOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| las2las_filter.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterNumber import ParameterNumber | ||
| from processing.parameters.ParameterString import ParameterString | ||
| from processing.parameters.ParameterSelection import ParameterSelection | ||
|
|
||
| class las2las_filter(LAStoolsAlgorithm): | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "las2las_filter" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParametersFilter1ReturnClassFlagsGUI() | ||
| self.addParametersFilter2ReturnClassFlagsGUI() | ||
| self.addParametersFilter1CoordsIntensityGUI() | ||
| self.addParametersFilter2CoordsIntensityGUI() | ||
| self.addParametersPointOutputGUI() | ||
|
|
||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "las2las.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| self.addParametersFilter1ReturnClassFlagsCommands(commands) | ||
| self.addParametersFilter2ReturnClassFlagsCommands(commands) | ||
| self.addParametersFilter1CoordsIntensityCommands(commands) | ||
| self.addParametersFilter2CoordsIntensityCommands(commands) | ||
|
|
||
| self.addParametersPointOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| las2las_transform.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterNumber import ParameterNumber | ||
| from processing.parameters.ParameterString import ParameterString | ||
| from processing.parameters.ParameterSelection import ParameterSelection | ||
|
|
||
| class las2las_transform(LAStoolsAlgorithm): | ||
|
|
||
| STEP = "STEP" | ||
| OPERATION = "OPERATION" | ||
| OPERATIONS = ["---", "set_point_type", "set_point_size", "set_version_minor", "set_version_major", "start_at_point", "stop_at_point", "remove_vlr", "auto_reoffset", "week_to_adjusted", "adjusted_to_week", "scale_rgb_up", "scale_rgb_down", "remove_all_vlrs", "remove_extra", "clip_to_bounding_box"] | ||
| OPERATIONARG = "OPERATIONARG" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "las2las_transform" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParametersTransform1CoordinateGUI() | ||
| self.addParametersTransform2CoordinateGUI() | ||
| self.addParametersTransform1OtherGUI() | ||
| self.addParametersTransform2OtherGUI() | ||
| self.addParameter(ParameterSelection(las2las_transform.OPERATION, "operations (first 7 need an argument)", las2las_transform.OPERATIONS, 0)) | ||
| self.addParameter(ParameterString(las2las_transform.OPERATIONARG, "argument for operation")) | ||
| self.addParametersPointOutputGUI() | ||
|
|
||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "las2las.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| self.addParametersTransform1CoordinateCommands(commands) | ||
| self.addParametersTransform2CoordinateCommands(commands) | ||
| self.addParametersTransform1OtherCommands(commands) | ||
| self.addParametersTransform2OtherCommands(commands) | ||
| operation = self.getParameterValue(las2las_transform.OPERATION) | ||
| if operation != 0: | ||
| commands.append("-" + las2las_transform.OPERATIONS[operation]) | ||
| if operation > 7: | ||
| commands.append(self.getParameterValue(las2las_transform.OPERATIONARG)) | ||
|
|
||
| self.addParametersPointOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| las2txt.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterString import ParameterString | ||
| from processing.outputs.OutputFile import OutputFile | ||
|
|
||
| class las2txt(LAStoolsAlgorithm): | ||
|
|
||
| PARSE_STRING = "PARSE_STRING" | ||
| OUTPUT = "OUTPUT" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "las2txt" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParameter(ParameterString(las2txt.PARSE_STRING, "parse_string", "xyz")) | ||
| self.addOutput(OutputFile(las2txt.OUTPUT, "Output ASCII file")) | ||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "las2txt.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| parse_string = self.getParameterValue(las2txt.PARSE_STRING) | ||
| if parse_string != "xyz": | ||
| commands.append("-parse_string") | ||
| commands.append(parse_string) | ||
| commands.append("-o") | ||
| commands.append(self.getOutputValue(las2txt.OUTPUT)) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lascanopy.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from PyQt4 import QtGui | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterNumber import ParameterNumber | ||
| from processing.parameters.ParameterString import ParameterString | ||
| from processing.parameters.ParameterSelection import ParameterSelection | ||
|
|
||
| class lascanopy(LAStoolsAlgorithm): | ||
|
|
||
| HEIGHT_CUTOFF = "HEIGHT_CUTOFF" | ||
| ATTRIBUTE = "ATTRIBUTE" | ||
| PRODUCT1 = "PRODUCT1" | ||
| PRODUCT2 = "PRODUCT2" | ||
| PRODUCT3 = "PRODUCT3" | ||
| PRODUCT4 = "PRODUCT4" | ||
| PRODUCT5 = "PRODUCT5" | ||
| PRODUCT6 = "PRODUCT6" | ||
| PRODUCT7 = "PRODUCT7" | ||
| PRODUCT8 = "PRODUCT8" | ||
| PRODUCT9 = "PRODUCT9" | ||
| PRODUCTS = ["---", "min", "max", "avg", "std", "ske", "kur", "cov", "dns", "p01", "p05", "p10", "p25", "p50", "p75", "p90", "p99"] | ||
| COUNTS = "COUNTS" | ||
| DENSITIES = "DENSITIES" | ||
| USE_TILE_BB = "USE_TILE_BB" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lascanopy" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParametersStepGUI() | ||
| self.addParameter(ParameterNumber(lascanopy.HEIGHT_CUTOFF, "height cutoff / breast height", False, False, 1.37)) | ||
| self.addParameter(ParameterSelection(lascanopy.PRODUCT1, "create", lascanopy.PRODUCTS, 0)) | ||
| self.addParameter(ParameterSelection(lascanopy.PRODUCT2, "create", lascanopy.PRODUCTS, 0)) | ||
| self.addParameter(ParameterSelection(lascanopy.PRODUCT3, "create", lascanopy.PRODUCTS, 0)) | ||
| self.addParameter(ParameterSelection(lascanopy.PRODUCT4, "create", lascanopy.PRODUCTS, 0)) | ||
| self.addParameter(ParameterSelection(lascanopy.PRODUCT5, "create", lascanopy.PRODUCTS, 0)) | ||
| self.addParameter(ParameterSelection(lascanopy.PRODUCT6, "create", lascanopy.PRODUCTS, 0)) | ||
| self.addParameter(ParameterSelection(lascanopy.PRODUCT7, "create", lascanopy.PRODUCTS, 0)) | ||
| self.addParameter(ParameterSelection(lascanopy.PRODUCT8, "create", lascanopy.PRODUCTS, 0)) | ||
| self.addParameter(ParameterSelection(lascanopy.PRODUCT9, "create", lascanopy.PRODUCTS, 0)) | ||
| self.addParameter(ParameterString(lascanopy.COUNTS, "count rasters (e.g. 2.0 5.0 10.0 20.0)", "")) | ||
| self.addParameter(ParameterString(lascanopy.DENSITIES, "density rasters (e.g. 2.0 5.0 10.0 20.0)", "")) | ||
| self.addParameter(ParameterBoolean(lascanopy.USE_TILE_BB, "use tile bounding box (after tiling with buffer)", False)) | ||
| self.addParametersRasterOutputGUI() | ||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lascanopy.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| self.addParametersStepCommands(commands) | ||
| product = self.getParameterValue(lascanopy.PRODUCT1) | ||
| if product != 0: | ||
| commands.append("-" + lascanopy.PRODUCTS[product]) | ||
| product = self.getParameterValue(lascanopy.PRODUCT2) | ||
| if product != 0: | ||
| commands.append("-" + lascanopy.PRODUCTS[product]) | ||
| product = self.getParameterValue(lascanopy.PRODUCT3) | ||
| if product != 0: | ||
| commands.append("-" + lascanopy.PRODUCTS[product]) | ||
| product = self.getParameterValue(lascanopy.PRODUCT4) | ||
| if product != 0: | ||
| commands.append("-" + lascanopy.PRODUCTS[product]) | ||
| product = self.getParameterValue(lascanopy.PRODUCT5) | ||
| if product != 0: | ||
| commands.append("-" + lascanopy.PRODUCTS[product]) | ||
| product = self.getParameterValue(lascanopy.PRODUCT6) | ||
| if product != 0: | ||
| commands.append("-" + lascanopy.PRODUCTS[product]) | ||
| product = self.getParameterValue(lascanopy.PRODUCT7) | ||
| if product != 0: | ||
| commands.append("-" + lascanopy.PRODUCTS[product]) | ||
| product = self.getParameterValue(lascanopy.PRODUCT8) | ||
| if product != 0: | ||
| commands.append("-" + lascanopy.PRODUCTS[product]) | ||
| product = self.getParameterValue(lascanopy.PRODUCT9) | ||
| if product != 0: | ||
| commands.append("-" + lascanopy.PRODUCTS[product]) | ||
| self.addParametersRasterOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lascontrol.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterVector import ParameterVector | ||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterNumber import ParameterNumber | ||
| from processing.parameters.ParameterSelection import ParameterSelection | ||
|
|
||
| class lascontrol(LAStoolsAlgorithm): | ||
|
|
||
| POLYGON = "POLYGON" | ||
| INTERIOR = "INTERIOR" | ||
| OPERATION = "OPERATION" | ||
| OPERATIONS = ["clip", "classify"] | ||
| CLASSIFY_AS = "CLASSIFY_AS" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lascontrol" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI(); | ||
| self.addParametersPointInputGUI() | ||
| self.addParameter(ParameterVector(lascontrol.POLYGON, "Input polygon(s)", ParameterVector.VECTOR_TYPE_POLYGON)) | ||
| self.addParameter(ParameterBoolean(lascontrol.INTERIOR, "interior", False)) | ||
| self.addParameter(ParameterSelection(lascontrol.OPERATION, "what to do with isolated points", lascontrol.OPERATIONS, 0)) | ||
| self.addParameter(ParameterNumber(lascontrol.CLASSIFY_AS, "classify as", 0, None, 12)) | ||
| self.addParametersPointOutputGUI() | ||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lascontrol.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| poly = self.getParameterValue(lascontrol.POLYGON) | ||
| if poly != None: | ||
| commands.append("-poly") | ||
| commands.append(poly) | ||
| if self.getParameterValue(lascontrol.INTERIOR): | ||
| commands.append("-interior") | ||
| operation = self.getParameterValue(lascontrol.OPERATION) | ||
| if operation != 0: | ||
| commands.append("-classify") | ||
| classify_as = self.getParameterValue(lascontrol.CLASSIFY_AS) | ||
| commands.append(str(classify_as)) | ||
| self.addParametersPointOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lasduplicate.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterFile import ParameterFile | ||
|
|
||
| class lasduplicate(LAStoolsAlgorithm): | ||
|
|
||
| LOWEST_Z = "LOWEST_Z" | ||
| UNIQUE_XYZ = "UNIQUE_XYZ" | ||
| SINGLE_RETURNS = "SINGLE_RETURNS" | ||
| RECORD_REMOVED = "RECORD_REMOVED" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lasduplicate" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParameter(ParameterBoolean(lasduplicate.LOWEST_Z, "keep duplicate with lowest z coordinate", False)) | ||
| self.addParameter(ParameterBoolean(lasduplicate.UNIQUE_XYZ, "only remove duplicates in x y and z", False)) | ||
| self.addParameter(ParameterBoolean(lasduplicate.SINGLE_RETURNS, "mark surviving duplicate as single return", False)) | ||
| self.addParameter(ParameterFile(lasduplicate.RECORD_REMOVED, "record removed duplictates to LAS/LAZ file")) | ||
| self.addParametersPointOutputGUI() | ||
|
|
||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasduplicate.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| if self.getParameterValue(lasduplicate.LOWEST_Z): | ||
| commands.append("-lowest_z") | ||
| if self.getParameterValue(lasduplicate.UNIQUE_XYZ): | ||
| commands.append("-unique_xyz") | ||
| if self.getParameterValue(lasduplicate.SINGLE_RETURNS): | ||
| commands.append("-single_returns") | ||
| record_removed = self.getParameterValue(lasduplicate.RECORD_REMOVED) | ||
| if record_removed != Null: | ||
| commands.append("-record_removed") | ||
| commands.append(record_removed) | ||
| self.addParametersPointOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lasindex.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
|
|
||
| class lasindex(LAStoolsAlgorithm): | ||
|
|
||
| MOBILE_OR_TERRESTRIAL = "MOBILE_OR_TERRESTRIAL" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lasindex" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParameter(ParameterBoolean(lasindex.MOBILE_OR_TERRESTRIAL, "is mobile or terrestrial LiDAR (not airborne)", False)) | ||
|
|
||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasindex.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| if self.getParameterValue(lasindex.MOBILE_OR_TERRESTRIAL): | ||
| commands.append("-tile_size") | ||
| commands.append("10") | ||
| commands.append("-maximum") | ||
| commands.append("-100") | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lasmerge.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterFile import ParameterFile | ||
|
|
||
| class lasmerge(LAStoolsAlgorithm): | ||
|
|
||
| FILE2 = "FILE2" | ||
| FILE3 = "FILE3" | ||
| FILE4 = "FILE4" | ||
| FILE5 = "FILE5" | ||
| FILE6 = "FILE6" | ||
| FILE7 = "FILE7" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lasmerge" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersFilesAreFlightlinesGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParameter(ParameterFile(lasmerge.FILE2, "2nd file")) | ||
| self.addParameter(ParameterFile(lasmerge.FILE3, "3rd file")) | ||
| self.addParameter(ParameterFile(lasmerge.FILE4, "4th file")) | ||
| self.addParameter(ParameterFile(lasmerge.FILE5, "5th file")) | ||
| self.addParameter(ParameterFile(lasmerge.FILE6, "6th file")) | ||
| self.addParameter(ParameterFile(lasmerge.FILE7, "7th file")) | ||
| self.addParametersPointOutputGUI() | ||
|
|
||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasmerge.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersFilesAreFlightlinesCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| file2 = self.getParameterValue(lasmerge.FILE2) | ||
| if file2 != None: | ||
| commands.append("-i") | ||
| commands.append(file2) | ||
| file3 = self.getParameterValue(lasmerge.FILE3) | ||
| if file3 != None: | ||
| commands.append("-i") | ||
| commands.append(file3) | ||
| file4 = self.getParameterValue(lasmerge.FILE4) | ||
| if file4 != None: | ||
| commands.append("-i") | ||
| commands.append(file4) | ||
| file5 = self.getParameterValue(lasmerge.FILE5) | ||
| if file5 != None: | ||
| commands.append("-i") | ||
| commands.append(file5) | ||
| file6 = self.getParameterValue(lasmerge.FILE6) | ||
| if file6 != None: | ||
| commands.append("-i") | ||
| commands.append(file6) | ||
| file7 = self.getParameterValue(lasmerge.FILE7) | ||
| if file7 != None: | ||
| commands.append("-i") | ||
| commands.append(file7) | ||
| self.addParametersPointOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lasnoise.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterNumber import ParameterNumber | ||
| from processing.parameters.ParameterSelection import ParameterSelection | ||
|
|
||
| class lasnoise(LAStoolsAlgorithm): | ||
|
|
||
| ISOLATED = "ISOLATED" | ||
| STEP_XY = "STEP_XY" | ||
| STEP_Z = "STEP_Z" | ||
| OPERATION = "OPERATION" | ||
| OPERATIONS = ["classify", "remove"] | ||
| CLASSIFY_AS = "CLASSIFY_AS" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lasnoise" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParameter(ParameterNumber(lasnoise.ISOLATED, "isolated if surrounding cells have only", 0, None, 5)) | ||
| self.addParameter(ParameterNumber(lasnoise.STEP_XY, "resolution of isolation grid in xy", 0, None, 4.0)) | ||
| self.addParameter(ParameterNumber(lasnoise.STEP_Z, "resolution of isolation grid in z ", 0, None, 4.0)) | ||
| self.addParameter(ParameterSelection(lasnoise.OPERATION, "what to do with isolated points", lasnoise.OPERATIONS, 0)) | ||
| self.addParameter(ParameterNumber(lasnoise.CLASSIFY_AS, "classify as", 0, None, 7)) | ||
| self.addParametersPointOutputGUI() | ||
|
|
||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasnoise.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| isolated = self.getParameterValue(lasnoise.ISOLATED) | ||
| commands.append("-isolated") | ||
| commands.append(str(isolated)) | ||
| step_xy = self.getParameterValue(lasnoise.STEP_XY) | ||
| commands.append("-step_xy") | ||
| commands.append(str(step_xy)) | ||
| step_z = self.getParameterValue(lasnoise.STEP_Z) | ||
| commands.append("-step_z") | ||
| commands.append(str(step_z)) | ||
| operation = self.getParameterValue(lasnoise.OPERATION) | ||
| if operation != 0: | ||
| commands.append("-remove_noise") | ||
| else: | ||
| commands.append("-classify_as") | ||
| classify_as = self.getParameterValue(lasnoise.CLASSIFY_AS) | ||
| commands.append(str(classify_as)) | ||
| self.addParametersPointOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lasoverage.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterNumber import ParameterNumber | ||
| from processing.parameters.ParameterSelection import ParameterSelection | ||
|
|
||
| class lasoverage(LAStoolsAlgorithm): | ||
|
|
||
| CHECK_STEP = "CHECK_STEP" | ||
| OPERATION = "OPERATION" | ||
| OPERATIONS= ["classify as overlap", "flag as withheld", "remove from output"] | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lasoverage" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParametersHorizontalFeetGUI() | ||
| self.addParametersFilesAreFlightlinesGUI() | ||
| self.addParameter(ParameterNumber(lasoverage.CHECK_STEP, "size of grid used for scan angle check", 0, None, 1.0)) | ||
| self.addParameter(ParameterSelection(lasoverage.OPERATION, "mode of operation", lasoverage.OPERATIONS, 0)) | ||
| self.addParametersPointOutputGUI() | ||
|
|
||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasoverage.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| self.addParametersHorizontalFeetCommands(commands) | ||
| self.addParametersFilesAreFlightlinesCommands(commands) | ||
| step = self.getParameterValue(lasoverage.CHECK_STEP) | ||
| if step != 1.0: | ||
| commands.append("-step") | ||
| commands.append(str(step)) | ||
| operation = self.getParameterValue(lasoverage.OPERATION) | ||
| if operation != 0: | ||
| commands.append("-" + OPERATIONS[operation]) | ||
| if self.getParameterValue(lasoverage.WITHHELD): | ||
| commands.append("-withheld") | ||
| self.addParametersPointOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lasoverlap.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from PyQt4 import QtGui | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterString import ParameterString | ||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterNumber import ParameterNumber | ||
| from processing.parameters.ParameterSelection import ParameterSelection | ||
|
|
||
| class lasoverlap(LAStoolsAlgorithm): | ||
|
|
||
| CHECK_STEP = "CHECK_STEP" | ||
| ATTRIBUTE = "ATTRIBUTE" | ||
| OPERATION = "OPERATION" | ||
| ATTRIBUTES = ["elevation", "intensity", "number_of_returns", "scan_angle_abs", "density"] | ||
| OPERATIONS = ["lowest", "highest", "average"] | ||
| CREATE_OVERLAP_RASTER = "CREATE_OVERLAP_RASTER" | ||
| CREATE_DIFFERENCE_RASTER = "CREATE_DIFFERENCE_RASTER" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lasoverlap" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParametersFilter1ReturnClassFlagsGUI() | ||
| self.addParameter(ParameterNumber(lasoverlap.CHECK_STEP, "size of grid used for overlap check", 0, None, 2.0)) | ||
| self.addParameter(ParameterSelection(lasoverlap.ATTRIBUTE, "attribute to check", lasoverlap.ATTRIBUTES, 0)) | ||
| self.addParameter(ParameterSelection(lasoverlap.OPERATION, "operation on attribute per cell", lasoverlap.OPERATIONS, 0)) | ||
| self.addParameter(ParameterBoolean(lasoverlap.CREATE_OVERLAP_RASTER, "create overlap raster", True)) | ||
| self.addParameter(ParameterBoolean(lasoverlap.CREATE_DIFFERENCE_RASTER, "create difference raster", True)) | ||
| self.addParametersRasterOutputGUI() | ||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasoverlap.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| self.addParametersFilter1ReturnClassFlagsCommands(commands) | ||
| step = self.getParameterValue(lasoverlap.CHECK_STEP) | ||
| if step != 0.0: | ||
| commands.append("-step") | ||
| commands.append(str(step)) | ||
| commands.append("-values") | ||
| attribute = self.getParameterValue(lasoverlap.ATTRIBUTE) | ||
| if attribute != 0: | ||
| commands.append("-" + lasoverlap.ATTRIBUTES[attribute]) | ||
| operation = self.getParameterValue(lasoverlap.OPERATION) | ||
| if operation != 0: | ||
| commands.append("-" + lasoverlap.OPERATIONS[operation]) | ||
| if self.getParameterValue(lasoverlap.CREATE_OVERLAP_RASTER) != True: | ||
| commands.append("-no_over") | ||
| if self.getParameterValue(lasoverlap.CREATE_DIFFERENCE_RASTER) != True: | ||
| commands.append("-no_diff") | ||
| self.addParametersRasterOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lassort.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
|
|
||
| class lassort(LAStoolsAlgorithm): | ||
|
|
||
| BY_GPS_TIME = "BY_GPS_TIME" | ||
| BY_POINT_SOURCE_ID = "BY_POINT_SOURCE_ID" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lassort" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParameter(ParameterBoolean(lassort.BY_GPS_TIME, "sort by GPS time", False)) | ||
| self.addParameter(ParameterBoolean(lassort.BY_POINT_SOURCE_ID, "sort by point source ID", False)) | ||
| self.addParametersPointOutputGUI() | ||
|
|
||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lassort.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| if self.getParameterValue(lassort.BY_GPS_TIME): | ||
| commands.append("-gps_time") | ||
| if self.getParameterValue(lassort.BY_POINT_SOURCE_ID): | ||
| commands.append("-point_source") | ||
| self.addParametersPointOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lasthin.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterNumber import ParameterNumber | ||
| from processing.parameters.ParameterSelection import ParameterSelection | ||
|
|
||
| class lasthin(LAStoolsAlgorithm): | ||
|
|
||
| THIN_STEP = "THIN_STEP" | ||
| OPERATION = "OPERATION" | ||
| OPERATIONS= ["lowest", "random", "highest"] | ||
| WITHHELD = "WITHHELD" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lasthin" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParameter(ParameterNumber(lasthin.THIN_STEP, "size of grid used for thinning", 0, None, 1.0)) | ||
| self.addParameter(ParameterSelection(lasthin.OPERATION, "keep particular point per cell", lasthin.OPERATIONS, 0)) | ||
| self.addParameter(ParameterBoolean(lasthin.WITHHELD, "mark points as withheld", False)) | ||
| self.addParametersPointOutputGUI() | ||
|
|
||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasthin.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| step = self.getParameterValue(lasthin.THIN_STEP) | ||
| if step != 0.0: | ||
| commands.append("-step") | ||
| commands.append(str(step)) | ||
| operation = self.getParameterValue(lasthin.OPERATION) | ||
| if operation != 0: | ||
| commands.append("-" + OPERATIONS[operation]) | ||
| if self.getParameterValue(lasthin.WITHHELD): | ||
| commands.append("-withheld") | ||
| self.addParametersPointOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lastile.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
|
|
||
| from processing.parameters.ParameterBoolean import ParameterBoolean | ||
| from processing.parameters.ParameterNumber import ParameterNumber | ||
|
|
||
| class lastile(LAStoolsAlgorithm): | ||
|
|
||
| TILE_SIZE = "TILE_SIZE" | ||
| BUFFER = "BUFFER" | ||
| REVERSIBLE = "REVERSIBLE" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lastile" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addParametersFilesAreFlightlinesGUI() | ||
| self.addParameter(ParameterNumber(lastile.TILE_SIZE, "tile size (side length of square tile)", None, None, 1000.0)) | ||
| self.addParameter(ParameterNumber(lastile.BUFFER, "buffer around each tile", None, None, 0.0)) | ||
| self.addParameter(ParameterNumber(lastile.BUFFER, "make tiling reversible (advanced)", False)) | ||
| self.addParametersPointOutputGUI() | ||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lastile.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| self.addParametersFilesAreFlightlinesCommands(commands) | ||
| tile_size = self.getParameterValue(lastile.TILE_SIZE) | ||
| commands.append("-tile_size") | ||
| commands.append(str(tile_size)) | ||
| buffer = self.getParameterValue(lastile.BUFFER) | ||
| if buffer != 0.0: | ||
| commands.append("-buffer") | ||
| commands.append(str(buffer)) | ||
| if self.getParameterValue(lastile.REVERSIBLE): | ||
| commands.append("-reversible") | ||
| self.addParametersPointOutputCommands(commands) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| """ | ||
| *************************************************************************** | ||
| lasvalidate.py | ||
| --------------------- | ||
| Date : September 2013 | ||
| Copyright : (C) 2013 by Martin Isenburg | ||
| Email : martin near rapidlasso point com | ||
| *************************************************************************** | ||
| * * | ||
| * This program is free software; you can redistribute it and/or modify * | ||
| * it under the terms of the GNU General Public License as published by * | ||
| * the Free Software Foundation; either version 2 of the License, or * | ||
| * (at your option) any later version. * | ||
| * * | ||
| *************************************************************************** | ||
| """ | ||
|
|
||
| __author__ = 'Martin Isenburg' | ||
| __date__ = 'September 2013' | ||
| __copyright__ = '(C) 2013, Martin Isenburg' | ||
| # This will get replaced with a git SHA1 when you do a git archive | ||
| __revision__ = '$Format:%H$' | ||
|
|
||
| import os | ||
| from processing.lidar.lastools.LAStoolsUtils import LAStoolsUtils | ||
| from processing.lidar.lastools.LAStoolsAlgorithm import LAStoolsAlgorithm | ||
| from processing.outputs.OutputFile import OutputFile | ||
|
|
||
| class lasvalidate(LAStoolsAlgorithm): | ||
|
|
||
| OUTPUT = "OUTPUT" | ||
|
|
||
| def defineCharacteristics(self): | ||
| self.name = "lasvalidate" | ||
| self.group = "LAStools" | ||
| self.addParametersVerboseGUI() | ||
| self.addParametersPointInputGUI() | ||
| self.addOutput(OutputFile(lasvalidate.OUTPUT, "Output XML file")) | ||
|
|
||
| def processAlgorithm(self, progress): | ||
| commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasvalidate.exe")] | ||
| self.addParametersVerboseCommands(commands) | ||
| self.addParametersPointInputCommands(commands) | ||
| commands.append("-o") | ||
| commands.append(self.getOutputValue(lasvalidate.OUTPUT)) | ||
|
|
||
| LAStoolsUtils.runLAStools(commands, progress) |