Ejemplo n.º 1
0
    def processAlgorithm(self, progress):
        if (LAStoolsUtils.hasWine()):
            commands = [
                os.path.join(LAStoolsUtils.LAStoolsPath(), "bin",
                             "lasdiff.exe")
            ]
        else:
            commands = [
                os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasdiff")
            ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputCommands(commands)
        file = self.getParameterValue(lasdiff.OTHER_POINT_FILE)
        if file is not None:
            commands.append("-i")
            commands.append('"' + file + '"')
        shutup = self.getParameterValue(lasdiff.SHUTUP)
        if (shutup != 0):
            commands.append("-shutup")
            commands.append(lasdiff.SHUTUP_AFTER[shutup])
        if self.getParameterValue(lasdiff.CREATE_DIFFERENCE_FILE):
            self.addParametersPointOutputCommands(commands)
        self.addParametersAdditionalCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 2
0
    def processAlgorithm(self, progress):

        # first we tile the data with option '-reversible'
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lastile")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputCommands(commands)
        tile_size = self.getParameterValue(hugeFileGroundClassify.TILE_SIZE)
        commands.append("-tile_size")
        commands.append(str(tile_size))
        buffer = self.getParameterValue(hugeFileGroundClassify.BUFFER)
        if buffer != 0.0:
            commands.append("-buffer")
            commands.append(str(buffer))
        commands.append("-reversible")
        self.addParametersTemporaryDirectoryAsOutputDirectoryCommands(commands)
        commands.append("-o")
        commands.append("hugeFileGroundClassify.laz")

        LAStoolsUtils.runLAStools(commands, progress)

        # then we ground classify the reversible tiles
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasground")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersTemporaryDirectoryAsInputFilesCommands(
            commands, "hugeFileGroundClassify*.laz")
        airborne = self.getParameterValue(hugeFileGroundClassify.AIRBORNE)
        if not airborne:
            commands.append("-not_airborne")
        method = self.getParameterValue(hugeFileGroundClassify.TERRAIN)
        if method != 1:
            commands.append("-" + hugeFileGroundClassify.TERRAINS[method])
        granularity = self.getParameterValue(
            hugeFileGroundClassify.GRANULARITY)
        if granularity != 1:
            commands.append("-" +
                            hugeFileGroundClassify.GRANULARITIES[granularity])
        self.addParametersTemporaryDirectoryAsOutputDirectoryCommands(commands)
        commands.append("-odix")
        commands.append("_g")
        commands.append("-olaz")
        self.addParametersCoresCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)

        # then we reverse the tiling
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lastile")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersTemporaryDirectoryAsInputFilesCommands(
            commands, "hugeFileGroundClassify*_g.laz")
        commands.append("-reverse_tiling")
        self.addParametersPointOutputCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 3
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lascontrol")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputCommands(commands)
        file = self.getParameterValue(lascontrol.CONTROL_POINT_FILE)
        if file is not None:
            commands.append("-cp")
            commands.append('"' + file + '"')
        parse = self.getParameterValue(lascontrol.PARSE_STRING)
        if parse is not None:
            commands.append("-parse")
            commands.append(parse)
        use_point = self.getParameterValue(lascontrol.USE_POINTS)
        if use_point > 0:
            commands.append("-keep_class")
            commands.append(unicode(2))
            if use_point > 1:
                commands.append(unicode(8))
                if use_point > 2:
                    commands.append(unicode(6))
        if self.getParameterValue(lascontrol.ADJUST_Z):
            commands.append("-adjust_z")
            commands.append("-odix _adjusted")
            commands.append("-olaz")
        self.addParametersAdditionalCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 4
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasthin")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputFolderCommands(commands)
        step = self.getParameterValue(lasthinPro.THIN_STEP)
        if step != 0.0:
            commands.append("-step")
            commands.append(str(step))
        operation = self.getParameterValue(lasthinPro.OPERATION)
        if operation != 0:
            commands.append("-" + self.OPERATIONS[operation])
        if self.getParameterValue(lasthinPro.WITHHELD):
            commands.append("-withheld")
        if self.getParameterValue(lasthinPro.CLASSIFY_AS):
            commands.append("-classify_as")
            commands.append(
                str(self.getParameterValue(lasthinPro.CLASSIFY_AS_CLASS)))
        self.addParametersOutputDirectoryCommands(commands)
        self.addParametersOutputAppendixCommands(commands)
        self.addParametersPointOutputFormatCommands(commands)
        self.addParametersAdditionalCommands(commands)
        self.addParametersCoresCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 5
0
    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)
Ejemplo n.º 6
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasheight")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputFolderCommands(commands)
        if self.getParameterValue(lasheightPro.REPLACE_Z):
            commands.append("-replace_z")
        if self.getParameterValue(lasheightPro.DROP_ABOVE):
            commands.append("-drop_above")
            commands.append(
                unicode(self.getParameterValue(
                    lasheightPro.DROP_ABOVE_HEIGHT)))
        if self.getParameterValue(lasheightPro.DROP_BELOW):
            commands.append("-drop_below")
            commands.append(
                unicode(self.getParameterValue(
                    lasheightPro.DROP_BELOW_HEIGHT)))
        self.addParametersOutputDirectoryCommands(commands)
        self.addParametersOutputAppendixCommands(commands)
        self.addParametersPointOutputFormatCommands(commands)
        self.addParametersAdditionalCommands(commands)
        self.addParametersCoresCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 7
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasoverlap")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputFolderCommands(commands)
        self.addParametersFilesAreFlightlinesCommands(commands)
        self.addParametersFilter1ReturnClassFlagsCommands(commands)
        step = self.getParameterValue(lasoverlapPro.CHECK_STEP)
        if step != 0.0:
            commands.append("-step")
            commands.append(unicode(step))
        commands.append("-values")
        attribute = self.getParameterValue(lasoverlapPro.ATTRIBUTE)
        if attribute != 0:
            commands.append("-" + lasoverlapPro.ATTRIBUTES[attribute])
        operation = self.getParameterValue(lasoverlapPro.OPERATION)
        if operation != 0:
            commands.append("-" + lasoverlapPro.OPERATIONS[operation])
        if not self.getParameterValue(lasoverlapPro.CREATE_OVERLAP_RASTER):
            commands.append("-no_over")
        if not self.getParameterValue(lasoverlapPro.CREATE_DIFFERENCE_RASTER):
            commands.append("-no_diff")
        self.addParametersOutputDirectoryCommands(commands)
        self.addParametersOutputAppendixCommands(commands)
        self.addParametersRasterOutputFormatCommands(commands)
        self.addParametersRasterOutputCommands(commands)
        self.addParametersAdditionalCommands(commands)
        self.addParametersCoresCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 8
0
    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 is not None:
            commands.append('-i')
            commands.append(file2)
        file3 = self.getParameterValue(lasmerge.FILE3)
        if file3 is not None:
            commands.append('-i')
            commands.append(file3)
        file4 = self.getParameterValue(lasmerge.FILE4)
        if file4 is not None:
            commands.append('-i')
            commands.append(file4)
        file5 = self.getParameterValue(lasmerge.FILE5)
        if file5 is not None:
            commands.append('-i')
            commands.append(file5)
        file6 = self.getParameterValue(lasmerge.FILE6)
        if file6 is not None:
            commands.append('-i')
            commands.append(file6)
        file7 = self.getParameterValue(lasmerge.FILE7)
        if file7 is not None:
            commands.append('-i')
            commands.append(file7)
        self.addParametersPointOutputCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 9
0
    def processAlgorithm(self, progress):
        commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasinfo")]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputCommands(commands)
        if self.getParameterValue(lasinfo.COMPUTE_DENSITY):
            commands.append("-cd")
        if self.getParameterValue(lasinfo.REPAIR_BB):
            commands.append("-repair_bb")
        if self.getParameterValue(lasinfo.REPAIR_COUNTERS):
            commands.append("-repair_counters")
        histo = self.getParameterValue(lasinfo.HISTO1)
        if histo != 0:
            commands.append("-histo")
            commands.append(lasinfo.HISTOGRAM[histo])
            commands.append(str(self.getParameterValue(lasinfo.HISTO1_BIN)))
        histo = self.getParameterValue(lasinfo.HISTO2)
        if histo != 0:
            commands.append("-histo")
            commands.append(lasinfo.HISTOGRAM[histo])
            commands.append(str(self.getParameterValue(lasinfo.HISTO2_BIN)))
        histo = self.getParameterValue(lasinfo.HISTO3)
        if histo != 0:
            commands.append("-histo")
            commands.append(lasinfo.HISTOGRAM[histo])
            commands.append(str(self.getParameterValue(lasinfo.HISTO3_BIN)))
        commands.append("-o")
        commands.append(self.getOutputValue(lasinfo.OUTPUT))
        self.addParametersAdditionalCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 10
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasnoise")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputFolderCommands(commands)
        isolated = self.getParameterValue(lasnoisePro.ISOLATED)
        commands.append("-isolated")
        commands.append(str(isolated))
        step_xy = self.getParameterValue(lasnoisePro.STEP_XY)
        commands.append("-step_xy")
        commands.append(str(step_xy))
        step_z = self.getParameterValue(lasnoisePro.STEP_Z)
        commands.append("-step_z")
        commands.append(str(step_z))
        operation = self.getParameterValue(lasnoisePro.OPERATION)
        if operation != 0:
            commands.append("-remove_noise")
        else:
            commands.append("-classify_as")
            classify_as = self.getParameterValue(lasnoisePro.CLASSIFY_AS)
            commands.append(str(classify_as))
        self.addParametersOutputDirectoryCommands(commands)
        self.addParametersOutputAppendixCommands(commands)
        self.addParametersPointOutputFormatCommands(commands)
        self.addParametersAdditionalCommands(commands)
        self.addParametersCoresCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 11
0
    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)
Ejemplo n.º 12
0
    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)
Ejemplo n.º 13
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasboundary")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputCommands(commands)
        self.addParametersFilter1ReturnClassFlagsCommands(commands)
        mode = self.getParameterValue(lasboundary.MODE)
        if (mode != 0):
            if (mode == 1):
                commands.append("-use_lax")
            else:
                commands.append("-use_bb")
        else:
            concavity = self.getParameterValue(lasboundary.CONCAVITY)
            commands.append("-concavity")
            commands.append(str(concavity))
            if self.getParameterValue(lasboundary.HOLES):
                commands.append("-holes")
            if self.getParameterValue(lasboundary.DISJOINT):
                commands.append("-disjoint")
        self.addParametersVectorOutputCommands(commands)
        self.addParametersAdditionalCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 14
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), 'bin', 'txt2las.exe')
        ]
        self.addParametersVerboseCommands(commands)
        commands.append('-i')
        commands.append(self.getParameterValue(txt2las.INPUT))
        parse_string = self.getParameterValue(txt2las.PARSE_STRING)
        if parse_string != 'xyz':
            commands.append('-parse_string')
            commands.append(parse_string)
        skip = self.getParameterValue(txt2las.SKIP)
        if parse_string != 0:
            commands.append('-skip')
            commands.append(str(skip))
        scale_factor_xy = self.getParameterValue(txt2las.SCALE_FACTOR_XY)
        scale_factor_z = self.getParameterValue(txt2las.SCALE_FACTOR_Z)
        if scale_factor_xy != 0.01 or scale_factor_z != 0.01:
            commands.append('-set_scale_factor')
            commands.append(
                str(scale_factor_xy) + ' ' + str(scale_factor_xy) + ' ' +
                str(scale_factor_z))
        self.addParametersPointOutputCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 15
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lastile")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputFolderCommands(commands)
        self.addParametersFilesAreFlightlinesCommands(commands)
        self.addParametersApplyFileSourceIdCommands(commands)
        tile_size = self.getParameterValue(lastilePro.TILE_SIZE)
        commands.append("-tile_size")
        commands.append(str(tile_size))
        buffer = self.getParameterValue(lastilePro.BUFFER)
        if buffer != 0.0:
            commands.append("-buffer")
            commands.append(str(buffer))
        if self.getParameterValue(lastilePro.EXTRA_PASS):
            commands.append("-extra_pass")
        self.addParametersOutputDirectoryCommands(commands)
        base_name = self.getParameterValue(lastilePro.BASE_NAME)
        if base_name is not None:
            commands.append("-o")
            commands.append(base_name)
        self.addParametersPointOutputFormatCommands(commands)
        self.addParametersAdditionalCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
    def processAlgorithm(self, progress):
        commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasground_new")]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputFolderCommands(commands)
        self.addParametersIgnoreClass1Commands(commands)
        self.addParametersHorizontalAndVerticalFeetCommands(commands)
        method = self.getParameterValue(lasgroundPro_new.TERRAIN)
        if (method == 5):
            commands.append("-step")
            commands.append(unicode(self.getParameterValue(lasgroundPro_new.STEP)))
            commands.append("-bulge")
            commands.append(unicode(self.getParameterValue(lasgroundPro_new.BULGE)))
            commands.append("-spike")
            commands.append(unicode(self.getParameterValue(lasgroundPro_new.SPIKE)))
            commands.append("-spike_down")
            commands.append(unicode(self.getParameterValue(lasgroundPro_new.DOWN_SPIKE)))
            commands.append("-offset")
            commands.append(unicode(self.getParameterValue(lasgroundPro_new.OFFSET)))
        else:
            commands.append("-" + lasgroundPro_new.TERRAINS[method])
        granularity = self.getParameterValue(lasgroundPro_new.GRANULARITY)
        if (granularity != 1):
            commands.append("-" + lasgroundPro_new.GRANULARITIES[granularity])
        self.addParametersOutputDirectoryCommands(commands)
        self.addParametersOutputAppendixCommands(commands)
        self.addParametersPointOutputFormatCommands(commands)
        self.addParametersAdditionalCommands(commands)
        self.addParametersCoresCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 17
0
    def processAlgorithm(self, progress):

        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasview")
        ]
        self.addParametersVerboseCommands(commands)

        # get area-of-interest
        aoi = unicode(self.getParameterValue(self.AOI))
        aoiCoords = aoi.split(',')

        # get layers
        layers = QgsMapLayerRegistry.instance().mapLayers()

        # loop over layers
        for name, layer in layers.iteritems():
            layerType = layer.type()
            if layerType == QgsMapLayer.VectorLayer:
                shp_file_name = layer.source()
                file_name = shp_file_name[:-4] + ".laz"
                commands.append('-i')
                commands.append(file_name)

        commands.append("-files_are_flightlines")
        commands.append('-inside')
        commands.append(aoiCoords[0])
        commands.append(aoiCoords[2])
        commands.append(aoiCoords[1])
        commands.append(aoiCoords[3])
        self.addParametersAdditionalCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 18
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "las2las")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputCommands(commands)
        source_projection = self.getParameterValue(
            las2las_project.SOURCE_PROJECTION)
        if source_projection != 0:
            if source_projection == 1:
                source_utm_zone = self.getParameterValue(
                    las2las_project.SOURCE_UTM)
                if source_utm_zone != 0:
                    commands.append(
                        "-" + las2las_project.PROJECTIONS[source_projection])
                    if source_utm_zone > 60:
                        commands.append(unicode(source_utm_zone - 60) + "M")
                    else:
                        commands.append(unicode(source_utm_zone) + "N")
            elif source_projection < 4:
                source_sp_code = self.getParameterValue(
                    las2las_project.SOURCE_SP)
                if source_sp_code != 0:
                    commands.append(
                        "-" + las2las_project.PROJECTIONS[source_projection])
                    commands.append(
                        las2las_project.STATE_PLANES[source_sp_code])
            else:
                commands.append("-" +
                                las2las_project.PROJECTIONS[source_projection])
        target_projection = self.getParameterValue(
            las2las_project.TARGET_PROJECTION)
        if target_projection != 0:
            if target_projection == 1:
                target_utm_zone = self.getParameterValue(
                    las2las_project.TARGET_UTM)
                if target_utm_zone != 0:
                    commands.append(
                        "-target_" +
                        las2las_project.PROJECTIONS[target_projection])
                    if target_utm_zone > 60:
                        commands.append(unicode(target_utm_zone - 60) + "M")
                    else:
                        commands.append(unicode(target_utm_zone) + "N")
            elif target_projection < 4:
                target_sp_code = self.getParameterValue(
                    las2las_project.TARGET_SP)
                if target_sp_code != 0:
                    commands.append(
                        "-target_" +
                        las2las_project.PROJECTIONS[target_projection])
                    commands.append(
                        las2las_project.STATE_PLANES[target_sp_code])
            else:
                commands.append("-target_" +
                                las2las_project.PROJECTIONS[target_projection])
        self.addParametersPointOutputCommands(commands)
        self.addParametersAdditionalCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 19
0
    def processAlgorithm(self, progress):
        commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "blast2iso")]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputFolderCommands(commands)
        self.addParametersPointInputMergedCommands(commands)
        smooth = self.getParameterValue(blast2isoPro.SMOOTH)
        if smooth != 0:
            commands.append("-smooth")
            commands.append(str(smooth))
        commands.append("-iso_every")
        commands.append(str(self.getParameterValue(blast2isoPro.ISO_EVERY)))
        simplify_length = self.getParameterValue(blast2isoPro.SIMPLIFY_LENGTH)
        if simplify_length != 0:
            commands.append("-simplify_length")
            commands.append(str(simplify_length))
        simplify_area = self.getParameterValue(blast2isoPro.SIMPLIFY_AREA)
        if simplify_area != 0:
            commands.append("-simplify_area")
            commands.append(str(simplify_area))
        clean = self.getParameterValue(blast2isoPro.CLEAN)
        if clean != 0:
            commands.append("-clean")
            commands.append(str(clean))
        self.addParametersOutputDirectoryCommands(commands)
        self.addParametersOutputAppendixCommands(commands)
        self.addParametersVectorOutputFormatCommands(commands)
        self.addParametersVectorOutputCommands(commands)
        self.addParametersAdditionalCommands(commands)
        self.addParametersCoresCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 20
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasgrid")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputFolderCommands(commands)
        self.addParametersPointInputMergedCommands(commands)
        self.addParametersFilter1ReturnClassFlagsCommands(commands)
        self.addParametersStepCommands(commands)
        attribute = self.getParameterValue(lasgridPro.ATTRIBUTE)
        if attribute != 0:
            commands.append("-" + lasgridPro.ATTRIBUTES[attribute])
        method = self.getParameterValue(lasgridPro.METHOD)
        if method != 0:
            commands.append("-" + lasgridPro.METHODS[method])
        if (self.getParameterValue(lasgridPro.USE_TILE_BB)):
            commands.append("-use_tile_bb")
        self.addParametersOutputDirectoryCommands(commands)
        self.addParametersOutputAppendixCommands(commands)
        self.addParametersRasterOutputFormatCommands(commands)
        self.addParametersRasterOutputCommands(commands)
        self.addParametersAdditionalCommands(commands)
        self.addParametersCoresCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 21
0
    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)
Ejemplo n.º 22
0
    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)
Ejemplo n.º 23
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasheight")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputFolderCommands(commands)
        self.addParametersIgnoreClass1Commands(commands)
        self.addParametersIgnoreClass2Commands(commands)
        if self.getParameterValue(lasheightPro_classify.REPLACE_Z):
            commands.append("-replace_z")
        classify = self.getParameterValue(lasheightPro_classify.CLASSIFY_BELOW)
        if (classify != 0):
            commands.append("-classify_below")
            commands.append(
                unicode(
                    self.getParameterValue(
                        lasheightPro_classify.CLASSIFY_BELOW_HEIGHT)))
            commands.append(unicode(classify))
        classify = self.getParameterValue(
            lasheightPro_classify.CLASSIFY_BETWEEN1)
        if (classify != 0):
            commands.append("-classify_between")
            commands.append(
                unicode(
                    self.getParameterValue(
                        lasheightPro_classify.CLASSIFY_BETWEEN1_HEIGHT_FROM)))
            commands.append(
                unicode(
                    self.getParameterValue(
                        lasheightPro_classify.CLASSIFY_BETWEEN1_HEIGHT_TO)))
            commands.append(unicode(classify))
        classify = self.getParameterValue(
            lasheightPro_classify.CLASSIFY_BETWEEN2)
        if (classify != 0):
            commands.append("-classify_between")
            commands.append(
                unicode(
                    self.getParameterValue(
                        lasheightPro_classify.CLASSIFY_BETWEEN2_HEIGHT_FROM)))
            commands.append(
                unicode(
                    self.getParameterValue(
                        lasheightPro_classify.CLASSIFY_BETWEEN2_HEIGHT_TO)))
            commands.append(unicode(classify))
        classify = self.getParameterValue(lasheightPro_classify.CLASSIFY_ABOVE)
        if (classify != 0):
            commands.append("-classify_above")
            commands.append(
                unicode(
                    self.getParameterValue(
                        lasheightPro_classify.CLASSIFY_ABOVE_HEIGHT)))
            commands.append(unicode(classify))
        self.addParametersOutputDirectoryCommands(commands)
        self.addParametersOutputAppendixCommands(commands)
        self.addParametersPointOutputFormatCommands(commands)
        self.addParametersAdditionalCommands(commands)
        self.addParametersCoresCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 24
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lascanopy")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputCommands(commands)
        plot_size = self.getParameterValue(lascanopy.PLOT_SIZE)
        if plot_size != 20:
            commands.append("-step")
            commands.append(unicode(plot_size))
        height_cutoff = self.getParameterValue(lascanopy.HEIGHT_CUTOFF)
        if height_cutoff != 1.37:
            commands.append("-height_cutoff")
            commands.append(unicode(height_cutoff))
        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])
        array = self.getParameterValue(lascanopy.COUNTS).split()
        if (len(array) > 1):
            commands.append("-c")
            for a in array:
                commands.append(a)
        array = self.getParameterValue(lascanopy.DENSITIES).split()
        if (len(array) > 1):
            commands.append("-d")
            for a in array:
                commands.append(a)
        if (self.getParameterValue(lascanopy.USE_TILE_BB)):
            commands.append("-use_tile_bb")
        if (self.getParameterValue(lascanopy.FILES_ARE_PLOTS)):
            commands.append("-files_are_plots")
        self.addParametersRasterOutputCommands(commands)
        self.addParametersAdditionalCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 25
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasview.exe")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 26
0
    def processAlgorithm(self, progress):
        commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasinfo.exe")]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputCommands(commands)
        commands.append("-o")
        commands.append(self.getOutputValue(lasinfo.OUTPUT))

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 27
0
    def processAlgorithm(self, progress):
        commands = [os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "lasclassify")]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputCommands(commands)
        self.addParametersHorizontalAndVerticalFeetCommands(commands)
        self.addParametersPointOutputCommands(commands)
        self.addParametersAdditionalCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 28
0
    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)
Ejemplo n.º 29
0
    def processAlgorithm(self, progress):
        commands = [
            os.path.join(LAStoolsUtils.LAStoolsPath(), "bin", "las2tin.exe")
        ]
        self.addParametersVerboseCommands(commands)
        self.addParametersPointInputCommands(commands)
        self.addParametersFilter1ReturnClassFlagsCommands(commands)
        self.addParametersVectorOutputCommands(commands)

        LAStoolsUtils.runLAStools(commands, progress)
Ejemplo n.º 30
0
    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)