Skip to content

Commit

Permalink
Move creation options to latest arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
nicogodet authored and github-actions[bot] committed Apr 29, 2023
1 parent 868c9fa commit 0dad8bc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/plugins/processing/algs/gdal/fillnodata.py
Original file line number Diff line number Diff line change
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 0dad8bc

Please sign in to comment.