Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move creation options to latest arguments
  • Loading branch information
nicogodet authored and nyalldawson committed Apr 30, 2023
1 parent a4873ea commit 3b104d8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/plugins/processing/algs/gdal/fillnodata.py
Expand Up @@ -116,6 +116,8 @@ def flags(self):

def getConsoleCommands(self, parameters, context, feedback, executing=True):
arguments = [
raster.source(),
out,
'-md',
str(self.parameterAsInt(parameters, self.DISTANCE, context)),
]
Expand Down Expand Up @@ -145,15 +147,13 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):
if raster is None:
raise QgsProcessingException(self.invalidRasterError(parameters, self.INPUT))

options = self.parameterAsString(parameters, self.OPTIONS, context)
if options:
arguments.extend(GdalUtils.parseCreationOptions(options))

if self.EXTRA in parameters and parameters[self.EXTRA] not in (None, ''):
extra = self.parameterAsString(parameters, self.EXTRA, context)
arguments.append(extra)

arguments.append(raster.source())
arguments.append(out)
# Until https://github.com/OSGeo/gdal/issues/7651 is fixed, creation options should be latest argument
options = self.parameterAsString(parameters, self.OPTIONS, context)
if options:
arguments.extend(GdalUtils.parseCreationOptions(options))

return [self.commandName() + ('.bat' if isWindows() else '.py'), GdalUtils.escapeAndJoin(arguments)]

0 comments on commit 3b104d8

Please sign in to comment.