Skip to content

Commit

Permalink
[Processing] Fix overwrite for GRASS7 (Redmine #13488)
Browse files Browse the repository at this point in the history
  • Loading branch information
Médéric Ribreux committed Feb 9, 2016
1 parent 964ae1f commit f49dbdc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -427,17 +427,17 @@ def processOutputs(self):
self.commands.append(command)
self.outputCommands.append(command)

command = 'r.out.gdal -c createopt="TFW=YES,COMPRESS=LZW"'
command = 'r.out.gdal --overwrite -c createopt="TFW=YES,COMPRESS=LZW"'
command += ' input='
command += 'correctedoutput' + self.uniqueSufix
command += ' output="' + filename + '"'
elif self.grass7Name == 'r.composite':
command = 'r.out.gdal -c createopt="TFW=YES,COMPRESS=LZW"'
command = 'r.out.gdal --overwrite -c createopt="TFW=YES,COMPRESS=LZW"'
command += ' input='
command += 'correctedoutput' + self.uniqueSufix
command += ' output="' + filename + '"'
else:
command = 'r.out.gdal -c createopt="TFW=YES,COMPRESS=LZW"'
command = 'r.out.gdal --overwrite -c createopt="TFW=YES,COMPRESS=LZW"'
command += ' input='

if self.grass7Name == 'r.horizon':
Expand Down Expand Up @@ -475,6 +475,7 @@ def processOutputs(self):
command += ' output="' + os.path.dirname(out.value) + '"'
command += ' format=ESRI_Shapefile'
command += ' output_layer=' + os.path.basename(out.value)[:-4]
command += ' --overwrite'
self.commands.append(command)
self.outputCommands.append(command)

Expand Down

0 comments on commit f49dbdc

Please sign in to comment.