Skip to content
Permalink
Browse files

fix grass7 v.sample

  • Loading branch information
Giovanni Manghi
Giovanni Manghi committed Sep 28, 2015
1 parent 2fa916d commit 8b17e8b50cdd6fc6090470e6944efd5b72343541
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 8b17e8b

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