Skip to content

Commit 4309b86

Browse files
committed
Merge pull request #2771 from medspx/fix_processing_grass_overwrite
[Processing] Fix overwrite for GRASS7 (Redmine #13488)
2 parents 63d9fec + f49dbdc commit 4309b86

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/plugins/processing/algs/grass7/Grass7Algorithm.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,17 +427,17 @@ def processOutputs(self):
427427
self.commands.append(command)
428428
self.outputCommands.append(command)
429429

430-
command = 'r.out.gdal -c createopt="TFW=YES,COMPRESS=LZW"'
430+
command = 'r.out.gdal --overwrite -c createopt="TFW=YES,COMPRESS=LZW"'
431431
command += ' input='
432432
command += 'correctedoutput' + self.uniqueSufix
433433
command += ' output="' + filename + '"'
434434
elif self.grass7Name == 'r.composite':
435-
command = 'r.out.gdal -c createopt="TFW=YES,COMPRESS=LZW"'
435+
command = 'r.out.gdal --overwrite -c createopt="TFW=YES,COMPRESS=LZW"'
436436
command += ' input='
437437
command += 'correctedoutput' + self.uniqueSufix
438438
command += ' output="' + filename + '"'
439439
else:
440-
command = 'r.out.gdal -c createopt="TFW=YES,COMPRESS=LZW"'
440+
command = 'r.out.gdal --overwrite -c createopt="TFW=YES,COMPRESS=LZW"'
441441
command += ' input='
442442

443443
if self.grass7Name == 'r.horizon':
@@ -475,6 +475,7 @@ def processOutputs(self):
475475
command += ' output="' + os.path.dirname(out.value) + '"'
476476
command += ' format=ESRI_Shapefile'
477477
command += ' output_layer=' + os.path.basename(out.value)[:-4]
478+
command += ' --overwrite'
478479
self.commands.append(command)
479480
self.outputCommands.append(command)
480481

0 commit comments

Comments
 (0)