mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Merge branch 'master' of https://github.com/scubbx/QGIS into processing-r.stat
Conflicts: python/plugins/processing/algs/grass7/Grass7Algorithm.py
This commit is contained in:
commit
6919d9841b
@ -361,11 +361,24 @@ class Grass7Algorithm(GeoAlgorithm):
|
||||
commands.append('g.region raster=' + out.name + uniqueSufix)
|
||||
outputCommands.append('g.region raster=' + out.name
|
||||
+ uniqueSufix)
|
||||
if self.grass7Name == 'r.composite':
|
||||
if self.grassName == 'r.statistics':
|
||||
# r.statistics saves its results in a non-qgis compatible way.
|
||||
# Post-Process with r.mapcalc.
|
||||
calcExpression = 'correctedoutput' + uniqueSufix
|
||||
calcExpression += '=@' + out.name + uniqueSufix
|
||||
command = 'r.mapcalc expression="' + calcExpression + '"'
|
||||
commands.append(command)
|
||||
outputCommands.append(command)
|
||||
|
||||
command = 'r.out.gdal -c createopt="TFW=YES,COMPRESS=LZW"'
|
||||
command += ' input='
|
||||
command += out.name + uniqueSufix
|
||||
command += ' output="' + filename + '"'
|
||||
elif self.grassName == 'r.statistics':
|
||||
command = 'r.out.gdal -c createopt="TFW=YES,COMPRESS=LZW"'
|
||||
command += ' input='
|
||||
command += 'correctedoutput' + uniqueSufix
|
||||
command += ' output="' + filename + '"'
|
||||
else:
|
||||
command = 'r.out.gdal -c createopt="TFW=YES,COMPRESS=LZW"'
|
||||
command += ' input='
|
||||
@ -375,6 +388,9 @@ class Grass7Algorithm(GeoAlgorithm):
|
||||
elif self.grass7Name == 'r.composite':
|
||||
commands.append(command)
|
||||
outputCommands.append(command)
|
||||
elif self.grassName == 'r.statistics':
|
||||
commands.append(command)
|
||||
outputCommands.append(command)
|
||||
else:
|
||||
command += out.name + uniqueSufix
|
||||
command += ' output="' + filename + '"'
|
||||
|
Loading…
x
Reference in New Issue
Block a user