mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
[processing] fixed saga split rgb for 2.1.4
This commit is contained in:
parent
8ac22c5f30
commit
295014647f
@ -70,30 +70,18 @@ class SplitRGBBands(GeoAlgorithm):
|
||||
g = self.getOutputValue(SplitRGBBands.G)
|
||||
b = self.getOutputValue(SplitRGBBands.B)
|
||||
commands = []
|
||||
if isWindows():
|
||||
commands.append('io_gdal 0 -GRIDS "' + temp + '" -FILES "' + input
|
||||
+ '"')
|
||||
commands.append('io_gdal 1 -GRIDS "' + temp
|
||||
+ '_0001.sgrd" -FORMAT 1 -TYPE 0 -FILE "' + r + '"'
|
||||
)
|
||||
commands.append('io_gdal 1 -GRIDS "' + temp
|
||||
+ '_0002.sgrd" -FORMAT 1 -TYPE 0 -FILE "' + g + '"'
|
||||
)
|
||||
commands.append('io_gdal 1 -GRIDS "' + temp
|
||||
+ '_0003.sgrd" -FORMAT 1 -TYPE 0 -FILE "' + b + '"'
|
||||
)
|
||||
else:
|
||||
commands.append('libio_gdal 0 -GRIDS "' + temp + '" -FILES "'
|
||||
+ input + '"')
|
||||
commands.append('libio_gdal 1 -GRIDS "' + temp
|
||||
+ '_0001.sgrd" -FORMAT 1 -TYPE 0 -FILE "' + r + '"'
|
||||
)
|
||||
commands.append('libio_gdal 1 -GRIDS "' + temp
|
||||
+ '_0002.sgrd" -FORMAT 1 -TYPE 0 -FILE "' + g + '"'
|
||||
)
|
||||
commands.append('libio_gdal 1 -GRIDS "' + temp
|
||||
+ '_0003.sgrd" -FORMAT 1 -TYPE 0 -FILE "' + b + '"'
|
||||
)
|
||||
version = SagaUtils.getSagaInstalledVersion(True)
|
||||
trailing = "000" if version != "2.1.4" else ""
|
||||
lib = "" if isWindows() else "lib"
|
||||
commands.append('%sio_gdal 0 -GRIDS "%s" -FILES "%s"' % (lib, temp, input)
|
||||
+ '"')
|
||||
commands.append('%sio_gdal 1 -GRIDS "%s_%s1.sgrd" -FORMAT 1 -TYPE 0 -FILE "%s"' %(lib, temp, trailing, r)
|
||||
)
|
||||
commands.append('%sio_gdal 1 -GRIDS "%s_%s2.sgrd" -FORMAT 1 -TYPE 0 -FILE "%s"' %(lib, temp, trailing, g)
|
||||
)
|
||||
commands.append('%sio_gdal 1 -GRIDS "%s_%s3.sgrd" -FORMAT 1 -TYPE 0 -FILE "%s"' %(lib, temp, trailing, b)
|
||||
)
|
||||
|
||||
|
||||
SagaUtils.createSagaBatchJobFileFromSagaCommands(commands)
|
||||
SagaUtils.executeSaga(progress)
|
||||
|
Loading…
x
Reference in New Issue
Block a user