Merge pull request #2399 from NaturalGIS/processing_fix_grass7_v_out_ogr

fix processing GRASS 7 v.out.ogr
This commit is contained in:
volaya 2015-10-28 15:06:53 +01:00
commit b339ad13c8

View File

@ -402,21 +402,21 @@ class Grass7Algorithm(GeoAlgorithm):
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 -s -e input=' + out.name + uniqueSufix
command = 'v.out.ogr type=line layer=0 -s -e input=' + out.name + uniqueSufix
elif self.grass7Name == 'v.voronoi':
if '-l' in command:
command = 'v.out.ogr type=line layer=0 -c -s -e input=' + out.name + uniqueSufix
command = 'v.out.ogr type=line layer=0 -s -e input=' + out.name + uniqueSufix
else:
command = 'v.out.ogr -c -s -e input=' + out.name + uniqueSufix
command = 'v.out.ogr -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
command = 'v.out.ogr type=point -s -e input=' + out.name + uniqueSufix
else:
command = 'v.out.ogr -c -s -e input=' + out.name + uniqueSufix
command = 'v.out.ogr -s -e input=' + out.name + uniqueSufix
command += ' type=' + outtype
command += ' output="' + os.path.dirname(out.value) + '"'
command += ' format=ESRI_Shapefile'
command += ' olayer=' + os.path.basename(out.value)[:-4]
command += ' output_layer=' + os.path.basename(out.value)[:-4]
commands.append(command)
outputCommands.append(command)