Skip to content

Commit 8b17e8b

Browse files
author
Giovanni Manghi
committed
fix grass7 v.sample
1 parent 2fa916d commit 8b17e8b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,20 +390,21 @@ def processAlgorithm(self, progress):
390390

391391
if isinstance(out, OutputVector):
392392
filename = out.value
393-
# FIXME: check if needed: -c Also export features without category (not labeled). Otherwise only features with category are exported.
394393
typeidx = self.getParameterValue(self.GRASS_OUTPUT_TYPE_PARAMETER)
395394
outtype = ('auto' if typeidx
396395
is None else self.OUTPUT_TYPES[typeidx])
397396
if self.grass7Name == 'r.flow':
398-
command = 'v.out.ogr type=line layer=0 -c -e input=' + out.name + uniqueSufix
397+
command = 'v.out.ogr type=line layer=0 -c -s -e input=' + out.name + uniqueSufix
399398
elif self.grass7Name == 'v.voronoi':
400399
if '-l' in command:
401-
command = 'v.out.ogr type=line layer=0 -c -e input=' + out.name + uniqueSufix
400+
command = 'v.out.ogr type=line layer=0 -c -s -e input=' + out.name + uniqueSufix
402401
else:
403-
command = 'v.out.ogr -s -e input=' + out.name + uniqueSufix
402+
command = 'v.out.ogr -c -s -e input=' + out.name + uniqueSufix
404403
command += ' type=' + outtype
404+
elif self.grass7Name == 'v.sample':
405+
command = 'v.out.ogr type=point -c -s -e input=' + out.name + uniqueSufix
405406
else:
406-
command = 'v.out.ogr -s -e input=' + out.name + uniqueSufix
407+
command = 'v.out.ogr -c -s -e input=' + out.name + uniqueSufix
407408
command += ' type=' + outtype
408409
command += ' output="' + os.path.dirname(out.value) + '"'
409410
command += ' format=ESRI_Shapefile'

0 commit comments

Comments
 (0)