Skip to content
Permalink
Browse files

Merge pull request #2339 from NaturalGIS/fix_grass7_v_sample

fix grass7 v.sample
  • Loading branch information
volaya committed Sep 29, 2015
2 parents fed74b2 + 8b17e8b commit 29b78a94c45807614983b46106b831f17ecc41fa
Showing with 6 additions and 5 deletions.
  1. +6 −5 python/plugins/processing/algs/grass7/Grass7Algorithm.py
@@ -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'

0 comments on commit 29b78a9

Please sign in to comment.
You can’t perform that action at this time.