Skip to content

Commit a135164

Browse files
committedJun 22, 2015
[processing] fixed output to non-supported vector formats in GRASS
1 parent 83782cc commit a135164

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎python/plugins/processing/algs/grass/GrassAlgorithm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def processAlgorithm(self, progress):
345345

346346
for out in self.outputs:
347347
if isinstance(out, OutputRaster):
348-
filename = out.value
348+
filename = out.getCompatibleFileName(self)
349349

350350
# Raster layer output: adjust region to layer before
351351
# exporting
@@ -372,11 +372,11 @@ def processAlgorithm(self, progress):
372372
outputCommands.append(command)
373373

374374
if isinstance(out, OutputVector):
375-
filename = out.value
375+
filename = out.getCompatibleFileName(self)
376376
command = 'v.out.ogr -s -c -e -z input=' + out.name + uniqueSufix
377-
command += ' dsn="' + os.path.dirname(out.value) + '"'
377+
command += ' dsn="' + os.path.dirname(filename) + '"'
378378
command += ' format=ESRI_Shapefile'
379-
command += ' olayer=' + os.path.basename(out.value)[:-4]
379+
command += ' olayer=' + os.path.splitext(os.path.basename(filename))[0]
380380
typeidx = \
381381
self.getParameterValue(self.GRASS_OUTPUT_TYPE_PARAMETER)
382382
outtype = ('auto' if typeidx

0 commit comments

Comments
 (0)
Please sign in to comment.