Skip to content

Commit

Permalink
fix grass7 v.sample
Browse files Browse the repository at this point in the history
  • Loading branch information
Giovanni Manghi committed Sep 28, 2015
1 parent 2fa916d commit 8b17e8b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions python/plugins/processing/algs/grass7/Grass7Algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,20 +390,21 @@ def processAlgorithm(self, progress):

if isinstance(out, OutputVector):
filename = out.value
# FIXME: check if needed: -c Also export features without category (not labeled). Otherwise only features with category are exported.
typeidx = self.getParameterValue(self.GRASS_OUTPUT_TYPE_PARAMETER)
outtype = ('auto' if typeidx
is None else self.OUTPUT_TYPES[typeidx])
if self.grass7Name == 'r.flow':
command = 'v.out.ogr type=line layer=0 -c -e input=' + out.name + uniqueSufix
command = 'v.out.ogr type=line layer=0 -c -s -e input=' + out.name + uniqueSufix
elif self.grass7Name == 'v.voronoi':
if '-l' in command:
command = 'v.out.ogr type=line layer=0 -c -e input=' + out.name + uniqueSufix
command = 'v.out.ogr type=line layer=0 -c -s -e input=' + out.name + uniqueSufix
else:
command = 'v.out.ogr -s -e input=' + out.name + uniqueSufix
command = 'v.out.ogr -c -s -e input=' + out.name + uniqueSufix
command += ' type=' + outtype
elif self.grass7Name == 'v.sample':
command = 'v.out.ogr type=point -c -s -e input=' + out.name + uniqueSufix
else:
command = 'v.out.ogr -s -e input=' + out.name + uniqueSufix
command = 'v.out.ogr -c -s -e input=' + out.name + uniqueSufix
command += ' type=' + outtype
command += ' output="' + os.path.dirname(out.value) + '"'
command += ' format=ESRI_Shapefile'
Expand Down

0 comments on commit 8b17e8b

Please sign in to comment.