Skip to content
Permalink
Browse files

[processing] make gdal algorithms honor selection

fixes #14622

(cherry picked from commit cc50157)
  • Loading branch information
volaya authored and alexbruy committed Apr 11, 2016
1 parent f412187 commit 35c01f8b83b98ee7446bd420ae7bbf3e345177eb
Showing with 10 additions and 1 deletion.
  1. +10 −1 python/plugins/processing/algs/gdal/GdalAlgorithm.py
@@ -16,6 +16,7 @@
* *
***************************************************************************
"""
from processing.tools import dataobjects


__author__ = 'Victor Olaya'
@@ -47,7 +48,15 @@ def getCustomParametersDialog(self):
return GdalAlgorithmDialog(self)

def processAlgorithm(self, progress):
GdalUtils.runGdal(self.getConsoleCommands(), progress)
commands = self.getConsoleCommands()
layers = dataobjects.getVectorLayers()
for i, c in enumerate(commands):
for layer in layers:
if layer.source() in c:
c = c.replace(layer.source(), dataobjects.exportVectorLayer(layer))

commands[i] = c
GdalUtils.runGdal(commands, progress)

def shortHelp(self):
return self._formatHelp('''This algorithm is based on the GDAL %s module.

0 comments on commit 35c01f8

Please sign in to comment.
You can’t perform that action at this time.