Skip to content
Permalink
Browse files

Merge pull request #945 from gioman/grassrasterexport

[processing] fixes GRASS raster export in order to cope with r.horizon and r.composite
  • Loading branch information
volaya committed Oct 20, 2013
2 parents 16ac256 + 6406835 commit 5b4fee893290e0e6a7d923ffc89c28f8326f6e1e
Showing with 17 additions and 6 deletions.
  1. +17 −6 python/plugins/processing/grass/GrassAlgorithm.py
@@ -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

0 comments on commit 5b4fee8

Please sign in to comment.
You can’t perform that action at this time.