예제 #1
0
 def processAlgorithm(self, progress):
     commands = [os.path.join(FusionUtils.FusionPath(), 'CanopyModel.exe')]
     commands.append('/verbose')
     self.addAdvancedModifiersToCommand(commands)
     ground = self.getParameterValue(self.GROUND)
     if str(ground).strip() != '':
         commands.append('/ground:' + str(ground))
     outFile = self.getOutputValue(self.OUTPUT) + '.dtm'
     commands.append(outFile)
     commands.append(str(self.getParameterValue(self.CELLSIZE)))
     commands.append(self.UNITS[self.getParameterValue(self.XYUNITS)][0])
     commands.append(self.UNITS[self.getParameterValue(self.ZUNITS)][0])
     commands.append('0')
     commands.append('0')
     commands.append('0')
     commands.append('0')
     files = self.getParameterValue(self.INPUT).split(';')
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())
     FusionUtils.runFusion(commands, progress)
     commands = [os.path.join(FusionUtils.FusionPath(), 'DTM2TIF.exe')]
     commands.append(outFile)
     commands.append(self.getOutputValue(self.OUTPUT))
     p = subprocess.Popen(commands, shell=True)
     p.wait()
예제 #2
0
파일: Cover.py 프로젝트: ChowZenki/QGIS
 def processAlgorithm(self, progress):
     commands = [os.path.join(FusionUtils.FusionPath(), "Cover.exe")]
     commands.append("/verbose")
     self.addAdvancedModifiersToCommand(commands)
     ground = self.getParameterValue(self.GROUND)
     if str(ground).strip() != "":
         commands.append("/ground:" + str(ground))
     outFile = self.getOutputValue(self.OUTPUT)+".dtm"
     commands.append(outFile)
     commands.append(str(self.getParameterValue(self.CELLSIZE)))
     commands.append(self.UNITS[self.getParameterValue(self.XYUNITS)][0])
     commands.append(self.UNITS[self.getParameterValue(self.ZUNITS)][0])
     commands.append("0")
     commands.append("0")
     commands.append("0")
     commands.append("0")
     files = self.getParameterValue(self.INPUT).split(";")
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())
     FusionUtils.runFusion(commands, progress)
     commands = [os.path.join(FusionUtils.FusionPath(), "DTM2TIF.exe")]
     commands.append(outFile)
     commands.append(self.getOutputValue(self.OUTPUT))
     p = subprocess.Popen(commands, shell=True)
     p.wait()
예제 #3
0
파일: GridMetrics.py 프로젝트: agresta/QGIS
 def processAlgorithm(self, progress):
     commands = [os.path.join(FusionUtils.FusionPath(), 'GridMetrics.exe')]
     commands.append('/verbose')
     outlier = self.getParameterValue(self.OUTLIER)
     if str(outlier).strip() != '':
         commands.append('/outlier:' + str(outlier))
     first = self.getParameterValue(self.FIRST)
     if first == 1:
         commands.append('/first:' + str(first))
     minht = self.getParameterValue(self.MINHT)
     if str(minht).strip() != '':
         commands.append('/minht:' + str(minht))
     class_var = self.getParameterValue(self.CLASS)
     if str(class_var).strip() != '':
         commands.append('/class:' + str(class_var))
     commands.append(self.getParameterValue(self.GROUND))
     commands.append(str(self.getParameterValue(self.HEIGHT)))
     commands.append(str(self.getParameterValue(self.CELLSIZE)))
     commands.append(self.getOutputValue(self.OUTPUT_CSV_ELEVATION))
     files = self.getParameterValue(self.INPUT).split(';')
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())
     FusionUtils.runFusion(commands, progress)
     basePath = self.getOutputValue(self.OUTPUT_CSV_ELEVATION)
     basePath = os.path.join(os.path.dirname(basePath), os.path.splitext(os.path.basename(basePath))[0])
     self.setOutputValue(self.OUTPUT_CSV_ELEVATION, basePath + '_all_returns_elevation_stats.csv')
     self.setOutputValue(self.OUTPUT_CSV_INTENSITY, basePath + '_all_returns_intensity_stats.csv')
     self.setOutputValue(self.OUTPUT_TXT_ELEVATION, basePath + '_all_returns_elevation_stats_ascii_header.txt')
     self.setOutputValue(self.OUTPUT_TXT_INTENSITY, basePath + '_all_returns_intensity_stats_ascii_header.txt')
예제 #4
0
파일: Csv2Grid.py 프로젝트: agresta/QGIS
 def processAlgorithm(self, progress):
     commands = [os.path.join(FusionUtils.FusionPath(), 'CSV2Grid.exe')]
     commands.append('/verbose')
     files = self.getParameterValue(self.INPUT).split(';')
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())
     commands.append(self.getParameterValue(self.COLUMN))
     commands.append(self.getOutputValue(self.OUTPUT) + '.asc')
     FusionUtils.runFusion(commands, progress)
예제 #5
0
 def processAlgorithm(self, progress):
     commands = [os.path.join(FusionUtils.FusionPath(), "MergeData.exe")]
     commands.append("/verbose")
     self.addAdvancedModifiersToCommand(commands)
     files = self.getParameterValue(self.INPUT).split(";")
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())
     outFile = self.getOutputValue(self.OUTPUT)
     commands.append(outFile)
     FusionUtils.runFusion(commands, progress)
예제 #6
0
    def processAlgorithm(self, progress):
        commands = [os.path.join(FusionUtils.FusionPath(), 'CloudMetrics.exe')]
        commands.append('/verbose')
        self.addAdvancedModifiersToCommand(commands)
        files = self.getParameterValue(self.INPUT).split(';')
        if len(files) == 1:
            commands.append(self.getParameterValue(self.INPUT))
        else:
            FusionUtils.createFileList(files)
            commands.append(FusionUtils.tempFileListFilepath())
        commands.append(self.getOutputValue(self.OUTPUT))

        FusionUtils.runFusion(commands, progress)
예제 #7
0
    def processAlgorithm(self, progress):
        commands = [os.path.join(FusionUtils.FusionPath(), 'CloudMetrics.exe')]
        commands.append('/verbose')
        self.addAdvancedModifiersToCommand(commands)
        files = self.getParameterValue(self.INPUT).split(';')
        if len(files) == 1:
            commands.append(self.getParameterValue(self.INPUT))
        else:
            FusionUtils.createFileList(files)
            commands.append(FusionUtils.tempFileListFilepath())
        commands.append(self.getOutputValue(self.OUTPUT))

        FusionUtils.runFusion(commands, progress)
예제 #8
0
    def processAlgorithm(self, progress):
        commands = [os.path.join(FusionUtils.FusionPath(), "GridMetrics.exe")]
        commands.append("/verbose")
        self.addAdvancedModifiersToCommand(commands)
        commands.append(self.getParameterValue(self.GROUND))
        commands.append(str(self.getParameterValue(self.HEIGHT)))
        commands.append(str(self.getParameterValue(self.CELLSIZE)))
        commands.append(self.getOutputValue(self.OUTPUT))
        files = self.getParameterValue(self.INPUT).split(";")
        if len(files) == 1:
            commands.append(self.getParameterValue(self.INPUT))
        else:
            FusionUtils.createFileList(files)
            commands.append(FusionUtils.tempFileListFilepath())

        FusionUtils.runFusion(commands, progress)
예제 #9
0
    def processAlgorithm(self, progress):
        commands = [os.path.join(FusionUtils.FusionPath(), "GridMetrics.exe")]
        commands.append("/verbose")
        self.addAdvancedModifiersToCommand(commands)
        commands.append(self.getParameterValue(self.GROUND))
        commands.append(str(self.getParameterValue(self.HEIGHT)))
        commands.append(str(self.getParameterValue(self.CELLSIZE)))
        commands.append(self.getOutputValue(self.OUTPUT))
        files = self.getParameterValue(self.INPUT).split(";")
        if len(files) == 1:
            commands.append(self.getParameterValue(self.INPUT))
        else:
            FusionUtils.createFileList(files)
            commands.append(FusionUtils.tempFileListFilepath())

        FusionUtils.runFusion(commands, progress)
예제 #10
0
    def processAlgorithm(self, progress):
        commands = [os.path.join(FusionUtils.FusionPath(), "CanopyMaxima.exe")]
        commands.append("/verbose")
        self.addAdvancedModifiersToCommand(commands)
        ground = self.getParameterValue(self.GROUND)
        if str(ground).strip() != "":
            commands.append("/ground:" + str(ground))
        commands.append("/threshold:" + str(self.getParameterValue(self.THRESHOLD)))
        files = self.getParameterValue(self.INPUT).split(";")
        if len(files) == 1:
            commands.append(self.getParameterValue(self.INPUT))
        else:
            FusionUtils.createFileList(files)
            commands.append(FusionUtils.tempFileListFilepath())
        commands.append(self.getOutputValue(self.OUTPUT))

        FusionUtils.runFusion(commands, progress)
예제 #11
0
 def processAlgorithm(self, progress):
     commands = [os.path.join(FusionUtils.FusionPath(), 'GridSurfaceCreate.exe')]
     commands.append('/verbose')
     spike = self.getParameterValue(self.SPIKE)
     if str(spike).strip() != '':
         commands.append('/spike:' + str(spike))
     median = self.getParameterValue(self.MEDIAN)
     if str(median).strip() != '':
         commands.append('/median:' + str(median))
     smooth = self.getParameterValue(self.SMOOTH)
     if str(smooth).strip() != '':
         commands.append('/smooth:' + str(smooth))
     slope = self.getParameterValue(self.SLOPE)
     if str(slope).strip() != '':
         commands.append('/slope:' + str(slope))
     minimum = self.getParameterValue(self.MINIMUM)
     if str(minimum).strip() != '':
         commands.append('/minimum:' + str(minimum))
     class_var = self.getParameterValue(self.CLASS)
     if str(class_var).strip() != '':
         commands.append('/class:' + str(class_var))
     advance_modifiers = str(self.getParameterValue(self.ADVANCED_MODIFIERS)).strip()
     if advance_modifiers != '':
         commands.append(s)
     commands.append(self.getOutputValue(self.OUTPUT_DTM) + '.dtm')
     commands.append(str(self.getParameterValue(self.CELLSIZE)))
     commands.append(self.UNITS[self.getParameterValue(self.XYUNITS)][0])
     commands.append(self.UNITS[self.getParameterValue(self.ZUNITS)][0])
     commands.append('0')
     commands.append('0')
     commands.append('0')
     commands.append('0')
     files = self.getParameterValue(self.INPUT).split(';')
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())        
     FusionUtils.runFusion(commands, progress)
     ascii = self.getParameterValue(self.ASCII)
     if ascii == 1:
         commands = [os.path.join(FusionUtils.FusionPath(), 'DTM2ASCII.exe')]
         commands.append(self.getOutputValue(self.OUTPUT_DTM) + '.dtm')
         commands.append(self.getOutputValue(self.OUTPUT_ASCII) + '.asc')
         p = subprocess.Popen(commands, shell=True)
         p.wait()
예제 #12
0
    def processAlgorithm(self, progress):
        commands = [os.path.join(FusionUtils.FusionPath(), 'CanopyMaxima.exe')]
        commands.append('/verbose')
        self.addAdvancedModifiersToCommand(commands)
        ground = self.getParameterValue(self.GROUND)
        if str(ground).strip() != '':
            commands.append('/ground:' + str(ground))
        commands.append('/threshold:'
                        + str(self.getParameterValue(self.THRESHOLD)))
        files = self.getParameterValue(self.INPUT).split(';')
        if len(files) == 1:
            commands.append(self.getParameterValue(self.INPUT))
        else:
            FusionUtils.createFileList(files)
            commands.append(FusionUtils.tempFileListFilepath())
        commands.append(self.getOutputValue(self.OUTPUT))

        FusionUtils.runFusion(commands, progress)
예제 #13
0
 def processAlgorithm(self, progress):
     commands = [os.path.join(FusionUtils.FusionPath(), "GroundFilter.exe")]
     commands.append("/verbose")
     self.addAdvancedModifiersToCommand(commands)
     outFile = self.getOutputValue(self.OUTPUT) + ".lda"
     commands.append(str(self.getParameterValue(self.CELLSIZE)))
     commands.append(outFile)
     files = self.getParameterValue(self.INPUT).split(";")
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())
     FusionUtils.runFusion(commands, progress)
     commands = [os.path.join(FusionUtils.FusionPath(), "LDA2LAS.exe")]
     commands.append(outFile)
     commands.append(self.getOutputValue(self.OUTPUT))
     p = subprocess.Popen(commands, shell=True)
     p.wait()
예제 #14
0
 def processAlgorithm(self, progress):
     commands = [os.path.join(FusionUtils.FusionPath(),
                 'GridSurfaceCreate.exe')]
     commands.append('/verbose')
     self.addAdvancedModifiersToCommand(commands)
     commands.append(self.getOutputValue(self.OUTPUT))
     commands.append(str(self.getParameterValue(self.CELLSIZE)))
     commands.append(self.UNITS[self.getParameterValue(self.XYUNITS)][0])
     commands.append(self.UNITS[self.getParameterValue(self.ZUNITS)][0])
     commands.append('0')
     commands.append('0')
     commands.append('0')
     commands.append('0')
     files = self.getParameterValue(self.INPUT).split(';')
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())
     FusionUtils.runFusion(commands, progress)
예제 #15
0
 def processAlgorithm(self, progress):
     commands = [os.path.join(FusionUtils.FusionPath(), 'FilterData.exe')]
     commands.append('/verbose')
     self.addAdvancedModifiersToCommand(commands)
     commands.append('outlier')
     commands.append(str(self.getParameterValue(self.VALUE)))
     commands.append(str(self.getParameterValue(self.WINDOWSIZE)))
     outFile = self.getOutputValue(self.OUTPUT) + '.lda'
     commands.append(outFile)
     files = self.getParameterValue(self.INPUT).split(';')
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())
     FusionUtils.runFusion(commands, progress)
     commands = [os.path.join(FusionUtils.FusionPath(), 'LDA2LAS.exe')]
     commands.append(outFile)
     commands.append(self.getOutputValue(self.OUTPUT))
     p = subprocess.Popen(commands, shell=True)
     p.wait()
예제 #16
0
 def processAlgorithm(self, progress):
     commands = [
         os.path.join(FusionUtils.FusionPath(), 'GridSurfaceCreate.exe')
     ]
     commands.append('/verbose')
     self.addAdvancedModifiersToCommand(commands)
     commands.append(self.getOutputValue(self.OUTPUT))
     commands.append(str(self.getParameterValue(self.CELLSIZE)))
     commands.append(self.UNITS[self.getParameterValue(self.XYUNITS)][0])
     commands.append(self.UNITS[self.getParameterValue(self.ZUNITS)][0])
     commands.append('0')
     commands.append('0')
     commands.append('0')
     commands.append('0')
     files = self.getParameterValue(self.INPUT).split(';')
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())
     FusionUtils.runFusion(commands, progress)
예제 #17
0
파일: Catalog.py 프로젝트: agresta/QGIS
 def processAlgorithm(self, progress):
     commands = [os.path.join(FusionUtils.FusionPath(), 'Catalog.exe')]
     commands.append('/verbose')
     intensity = self.getParameterValue(self.INTENSITY)
     if str(intensity).strip() != '':
         commands.append('/intensity:' + str(intensity))
     density = self.getParameterValue(self.DENSITY)
     if str(density).strip() != '':
         commands.append('/density:' + str(density))
     firstdensity = self.getParameterValue(self.FIRSTDENSITY)
     if str(firstdensity).strip() != '':
         commands.append('/firstdensity:' + str(firstdensity))
     advance_modifiers = str(self.getParameterValue(self.ADVANCED_MODIFIERS)).strip()
     if advance_modifiers != '':
         commands.append(s)
     files = self.getParameterValue(self.INPUT).split(';')
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())                
     commands.append(self.getOutputValue(self.OUTPUT))        
     FusionUtils.runFusion(commands, progress)
예제 #18
0
 def processAlgorithm(self, progress):
     commands = [os.path.join(FusionUtils.FusionPath(), "FilterData.exe")]
     commands.append("/verbose")
     self.addAdvancedModifiersToCommand(commands)
     commands.append("/shape:" + str(self.getParameterValue(self.SHAPE)))
     files = self.getParameterValue(self.INPUT).split(";")
     if len(files) == 1:
         commands.append(self.getParameterValue(self.INPUT))
     else:
         FusionUtils.createFileList(files)
         commands.append(FusionUtils.tempFileListFilepath())
     outFile = self.getOutputValue(self.OUTPUT) + ".lda"
     commands.append(outFile)
     extent = str(self.getParameterValue(self.EXTENT)).split(",")
     commands.append(extent[0])
     commands.append(extent[2])
     commands.append(extent[1])
     commands.append(extent[3])
     FusionUtils.runFusion(commands, progress)
     commands = [os.path.join(FusionUtils.FusionPath(), "LDA2LAS.exe")]
     commands.append(outFile)
     commands.append(self.getOutputValue(self.OUTPUT))
     p = subprocess.Popen(commands, shell=True)
     p.wait()