Skip to content

Commit

Permalink
Merge pull request #2339 from NaturalGIS/fix_grass7_v_sample
Browse files Browse the repository at this point in the history
fix grass7 v.sample
  • Loading branch information
volaya committed Sep 29, 2015
2 parents fed74b2 + 8b17e8b commit 29b78a9
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 29b78a9

Please sign in to comment.