Beispiel #1
0
    def processAlgorithm(self, parameters, context, feedback):
        GdalUtils.runGdal(
            self.getConsoleCommands(parameters, context, feedback), feedback)
        output = self.parameterAsFileOutput(parameters, self.OUTPUT, context)
        with open(output, 'w') as f:
            f.write('<pre>')
            for s in GdalUtils.getConsoleOutput()[1:]:
                f.write(str(s))
            f.write('</pre>')

        return {self.OUTPUT: output}
Beispiel #2
0
    def processAlgorithm(self, parameters, context, feedback):
        commands = self.getConsoleCommands(parameters,
                                           context,
                                           feedback,
                                           executing=True)
        GdalUtils.runGdal(commands, feedback)

        # auto generate outputs
        results = {}
        for o in self.outputDefinitions():
            if o.name() in parameters:
                results[o.name()] = parameters[o.name()]
        for k, v in self.output_values.items():
            results[k] = v

        return results