mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
fix GRASS7 v.voronoi output as lines
This commit is contained in:
parent
9d38b711c7
commit
fab465aa16
@ -401,30 +401,26 @@ class Grass7Algorithm(GeoAlgorithm):
|
||||
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 += ' output="' + os.path.dirname(out.value) + '"'
|
||||
command += ' format=ESRI_Shapefile'
|
||||
command += ' olayer=' + os.path.basename(out.value)[:-4]
|
||||
typeidx = \
|
||||
self.getParameterValue(self.GRASS_OUTPUT_TYPE_PARAMETER)
|
||||
outtype = ('auto' if typeidx
|
||||
is None else self.OUTPUT_TYPES[typeidx])
|
||||
command += ' type=' + outtype
|
||||
commands.append(command)
|
||||
outputCommands.append(command)
|
||||
elif self.grass7Name == 'v.voronoi':
|
||||
if '-l' in command:
|
||||
command = 'v.out.ogr type=line layer=0 -c -e input=' + out.name + uniqueSufix
|
||||
else :
|
||||
command = 'v.out.ogr -s -e input=' + out.name + uniqueSufix
|
||||
command += ' type=' + outtype
|
||||
else:
|
||||
command = 'v.out.ogr -s -e input=' + out.name + uniqueSufix
|
||||
command += ' output="' + os.path.dirname(out.value) + '"'
|
||||
command += ' format=ESRI_Shapefile'
|
||||
command += ' olayer=' + os.path.basename(out.value)[:-4]
|
||||
typeidx = \
|
||||
self.getParameterValue(self.GRASS_OUTPUT_TYPE_PARAMETER)
|
||||
outtype = ('auto' if typeidx
|
||||
is None else self.OUTPUT_TYPES[typeidx])
|
||||
command += ' type=' + outtype
|
||||
commands.append(command)
|
||||
outputCommands.append(command)
|
||||
command += ' output="' + os.path.dirname(out.value) + '"'
|
||||
command += ' format=ESRI_Shapefile'
|
||||
command += ' olayer=' + os.path.basename(out.value)[:-4]
|
||||
commands.append(command)
|
||||
outputCommands.append(command)
|
||||
|
||||
# 4: Run GRASS
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user