Skip to content
Permalink
Browse files

[processing] don't apply additional parameter if offset curve operati…

…on is used (fix #15342)

(cherry picked from commit 1d2b0b4)
  • Loading branch information
alexbruy committed Aug 1, 2016
1 parent 3e43333 commit 6851c347cb9ee3d6b49bac827599b44705a572f2
Showing with 19 additions and 7 deletions.
  1. +19 −7 python/plugins/processing/algs/gdal/ogr2ogronesidebuffer.py
@@ -86,7 +86,7 @@ def getConsoleCommands(self):
inLayer = self.getParameterValue(self.INPUT_LAYER)
ogrLayer = ogrConnectionString(inLayer)[1:-1]
layername = "'" + ogrLayerName(inLayer) + "'"
operation = self.OPERATIONLIST[self.getParameterValue(self.OPERATION)]
operation = self.getParameterValue(self.OPERATION)
geometry = unicode(self.getParameterValue(self.GEOMETRY))
distance = unicode(self.getParameterValue(self.RADIUS))
leftright = self.LEFTRIGHTLIST[self.getParameterValue(self.LEFTRIGHT)]
@@ -105,12 +105,12 @@ def getConsoleCommands(self):
arguments.append(ogrLayer)
arguments.append(ogrLayerName(inLayer))
if dissolveall or field != 'None':
if operation == 'Single Side Buffer':
if operation == 0:
arguments.append('-dialect sqlite -sql "SELECT ST_Union(ST_SingleSidedBuffer(')
else:
arguments.append('-dialect sqlite -sql "SELECT ST_Union(ST_OffsetCurve(')
else:
if operation == 'Single Side Buffer':
if operation == 0:
arguments.append('-dialect sqlite -sql "SELECT ST_SingleSidedBuffer(')
else:
arguments.append('-dialect sqlite -sql "SELECT ST_OffsetCurve(')
@@ -119,14 +119,26 @@ def getConsoleCommands(self):
arguments.append(distance)
if dissolveall or field != 'None':
if leftright == 'Left':
arguments.append(',0)),*')
if operation == 0:
arguments.append(',0)),*')
else:
arguments.append(')),*')
else:
arguments.append(',1)),*')
if operation == 0:
arguments.append(',1)),*')
else:
arguments.append(')),*')
else:
if leftright == 'Left':
arguments.append(',0),*')
if operation == 0:
arguments.append(',0),*')
else:
arguments.append('),*')
else:
arguments.append(',1),*')
if operation == 0:
arguments.append(',1),*')
else:
arguments.append('),*')
arguments.append('FROM')
arguments.append(layername)
if field != 'None':

0 comments on commit 6851c34

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