@@ -401,30 +401,26 @@ def processAlgorithm(self, progress):
401
401
if isinstance (out , OutputVector ):
402
402
filename = out .value
403
403
# FIXME: check if needed: -c Also export features without category (not labeled). Otherwise only features with category are exported.
404
+ typeidx = \
405
+ self .getParameterValue (self .GRASS_OUTPUT_TYPE_PARAMETER )
406
+ outtype = ('auto' if typeidx
407
+ is None else self .OUTPUT_TYPES [typeidx ])
404
408
if self .grass7Name == 'r.flow' :
405
409
command = 'v.out.ogr type=line layer=0 -c -e input=' + out .name + uniqueSufix
406
- command += ' output="' + os .path .dirname (out .value ) + '"'
407
- command += ' format=ESRI_Shapefile'
408
- command += ' olayer=' + os .path .basename (out .value )[:- 4 ]
409
- typeidx = \
410
- self .getParameterValue (self .GRASS_OUTPUT_TYPE_PARAMETER )
411
- outtype = ('auto' if typeidx
412
- is None else self .OUTPUT_TYPES [typeidx ])
413
- command += ' type=' + outtype
414
- commands .append (command )
415
- outputCommands .append (command )
410
+ elif self .grass7Name == 'v.voronoi' :
411
+ if '-l' in command :
412
+ command = 'v.out.ogr type=line layer=0 -c -e input=' + out .name + uniqueSufix
413
+ else :
414
+ command = 'v.out.ogr -s -e input=' + out .name + uniqueSufix
415
+ command += ' type=' + outtype
416
416
else :
417
417
command = 'v.out.ogr -s -e input=' + out .name + uniqueSufix
418
- command += ' output="' + os .path .dirname (out .value ) + '"'
419
- command += ' format=ESRI_Shapefile'
420
- command += ' olayer=' + os .path .basename (out .value )[:- 4 ]
421
- typeidx = \
422
- self .getParameterValue (self .GRASS_OUTPUT_TYPE_PARAMETER )
423
- outtype = ('auto' if typeidx
424
- is None else self .OUTPUT_TYPES [typeidx ])
425
418
command += ' type=' + outtype
426
- commands .append (command )
427
- outputCommands .append (command )
419
+ command += ' output="' + os .path .dirname (out .value ) + '"'
420
+ command += ' format=ESRI_Shapefile'
421
+ command += ' olayer=' + os .path .basename (out .value )[:- 4 ]
422
+ commands .append (command )
423
+ outputCommands .append (command )
428
424
429
425
# 4: Run GRASS
430
426
0 commit comments