mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
osgeo4w: fix b6293f23c8c (fixes #21210)
This commit is contained in:
parent
29d4496452
commit
eea4eda6a3
@ -92,9 +92,13 @@ class AssignProjection(GdalAlgorithm):
|
||||
|
||||
arguments.append(fileName)
|
||||
|
||||
commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
|
||||
if isWindows():
|
||||
commands.insert(0, 'python3')
|
||||
commands = ["python3", "-m", self.commandName()]
|
||||
else:
|
||||
commands = [self.commandName() + '.py']
|
||||
|
||||
commands.append(GdalUtils.escapeAndJoin(arguments))
|
||||
|
||||
self.setOutputValue(self.OUTPUT, fileName)
|
||||
|
||||
return commands
|
||||
|
@ -130,8 +130,11 @@ class fillnodata(GdalAlgorithm):
|
||||
arguments.append(raster.source())
|
||||
arguments.append(out)
|
||||
|
||||
commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
|
||||
if isWindows():
|
||||
commands.insert(0, 'python3')
|
||||
commands = ["python3", "-m", self.commandName()]
|
||||
else:
|
||||
commands = [self.commandName() + '.py']
|
||||
|
||||
commands.append(GdalUtils.escapeAndJoin(arguments))
|
||||
|
||||
return commands
|
||||
|
@ -229,8 +229,11 @@ class gdal2tiles(GdalAlgorithm):
|
||||
arguments.append(inLayer.source())
|
||||
arguments.append(self.parameterAsString(parameters, self.OUTPUT, context))
|
||||
|
||||
commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
|
||||
if isWindows():
|
||||
commands.insert(0, 'python3')
|
||||
commands = ["python3", "-m", self.commandName()]
|
||||
else:
|
||||
commands = [self.commandName() + '.py']
|
||||
|
||||
commands.append(GdalUtils.escapeAndJoin(arguments))
|
||||
|
||||
return commands
|
||||
|
@ -94,8 +94,11 @@ class gdal2xyz(GdalAlgorithm):
|
||||
arguments.append(raster.source())
|
||||
arguments.append(self.parameterAsFileOutput(parameters, self.OUTPUT, context))
|
||||
|
||||
commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
|
||||
if isWindows():
|
||||
commands.insert(0, 'python3')
|
||||
commands = ["python3", "-m", self.commandName()]
|
||||
else:
|
||||
commands = [self.commandName() + '.py']
|
||||
|
||||
commands.append(GdalUtils.escapeAndJoin(arguments))
|
||||
|
||||
return commands
|
||||
|
@ -166,8 +166,11 @@ class merge(GdalAlgorithm):
|
||||
arguments.append('--optfile')
|
||||
arguments.append(list_file)
|
||||
|
||||
commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
|
||||
if isWindows():
|
||||
commands.insert(0, 'python3')
|
||||
commands = ["python3", "-m", self.commandName()]
|
||||
else:
|
||||
commands = [self.commandName() + '.py']
|
||||
|
||||
commands.append(GdalUtils.escapeAndJoin(arguments))
|
||||
|
||||
return commands
|
||||
|
@ -103,8 +103,11 @@ class pct2rgb(GdalAlgorithm):
|
||||
if self.parameterAsBool(parameters, self.RGBA, context):
|
||||
arguments.append('-rgba')
|
||||
|
||||
commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
|
||||
if isWindows():
|
||||
commands.insert(0, 'python3')
|
||||
commands = ["python3", "-m", self.commandName()]
|
||||
else:
|
||||
commands = [self.commandName() + '.py']
|
||||
|
||||
commands.append(GdalUtils.escapeAndJoin(arguments))
|
||||
|
||||
return commands
|
||||
|
@ -116,8 +116,11 @@ class polygonize(GdalAlgorithm):
|
||||
arguments.append(layerName)
|
||||
arguments.append(self.parameterAsString(parameters, self.FIELD, context))
|
||||
|
||||
commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
|
||||
if isWindows():
|
||||
commands.insert(0, 'python3')
|
||||
commands = ["python3", "-m", self.commandName()]
|
||||
else:
|
||||
commands = [self.commandName() + '.py']
|
||||
|
||||
commands.append(GdalUtils.escapeAndJoin(arguments))
|
||||
|
||||
return commands
|
||||
|
@ -187,8 +187,11 @@ class proximity(GdalAlgorithm):
|
||||
arguments.append(inLayer.source())
|
||||
arguments.append(out)
|
||||
|
||||
commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
|
||||
if isWindows():
|
||||
commands.insert(0, 'python3')
|
||||
commands = ["python3", "-m", self.commandName()]
|
||||
else:
|
||||
commands = [self.commandName() + '.py']
|
||||
|
||||
commands.append(GdalUtils.escapeAndJoin(arguments))
|
||||
|
||||
return commands
|
||||
|
@ -209,8 +209,11 @@ class retile(GdalAlgorithm):
|
||||
layers = [l.source() for l in self.parameterAsLayerList(parameters, self.INPUT, context)]
|
||||
arguments.extend(layers)
|
||||
|
||||
commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
|
||||
if isWindows():
|
||||
commands.insert(0, 'python3')
|
||||
commands = ["python3", "-m", self.commandName()]
|
||||
else:
|
||||
commands = [self.commandName() + '.py']
|
||||
|
||||
commands.append(GdalUtils.escapeAndJoin(arguments))
|
||||
|
||||
return commands
|
||||
|
@ -95,8 +95,11 @@ class rgb2pct(GdalAlgorithm):
|
||||
arguments.append(raster.source())
|
||||
arguments.append(out)
|
||||
|
||||
commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
|
||||
if isWindows():
|
||||
commands.insert(0, 'python3')
|
||||
commands = ["python3", "-m", self.commandName()]
|
||||
else:
|
||||
commands = [self.commandName() + '.py']
|
||||
|
||||
commands.append(GdalUtils.escapeAndJoin(arguments))
|
||||
|
||||
return commands
|
||||
|
@ -120,8 +120,11 @@ class sieve(GdalAlgorithm):
|
||||
arguments.append(raster.source())
|
||||
arguments.append(out)
|
||||
|
||||
commands = [self.commandName() + '.py', GdalUtils.escapeAndJoin(arguments)]
|
||||
if isWindows():
|
||||
commands.insert(0, 'python3')
|
||||
commands = ["python3", "-m", self.commandName()]
|
||||
else:
|
||||
commands = [self.commandName() + '.py']
|
||||
|
||||
commands.append(GdalUtils.escapeAndJoin(arguments))
|
||||
|
||||
return commands
|
||||
|
Loading…
x
Reference in New Issue
Block a user