Skip to content

Commit

Permalink
[processing] make gdal algorithms honor selection
Browse files Browse the repository at this point in the history
fixes #14622

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


__author__ = 'Victor Olaya'
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 35c01f8

Please sign in to comment.