Skip to content

Commit

Permalink
fixes GRASS raster export in order to cope with r.horizon and r.compo…
Browse files Browse the repository at this point in the history
…site outputs
  • Loading branch information
gioman committed Oct 15, 2013
1 parent bad4b77 commit 6406835
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions python/plugins/processing/grass/GrassAlgorithm.py
Expand Up @@ -372,12 +372,23 @@ def processAlgorithm(self, progress):
commands.append('g.region rast=' + out.name + uniqueSufix)
outputCommands.append('g.region rast=' + out.name
+ uniqueSufix)
command = 'r.out.gdal -c createopt="TFW=YES,COMPRESS=LZW"'
command += ' input='
command += out.name + uniqueSufix
command += ' output="' + filename + '"'
commands.append(command)
outputCommands.append(command)
if self.grassName == 'r.composite':
command = 'r.out.tiff -t --verbose'
command += ' input='
command += out.name + uniqueSufix
command += ' output="' + filename + '"'
commands.append(command)
outputCommands.append(command)
else:
command = 'r.out.gdal -c createopt="TFW=YES,COMPRESS=LZW"'
command += ' input='
if self.grassName == 'r.horizon':
command += out.name + uniqueSufix + '_0'
else:
command += out.name + uniqueSufix
command += ' output="' + filename + '"'
commands.append(command)
outputCommands.append(command)

if isinstance(out, OutputVector):
filename = out.value
Expand Down

0 comments on commit 6406835

Please sign in to comment.