@@ -85,7 +85,7 @@ def getConsoleCommands(self):
85
85
inLayer = self .getParameterValue (self .INPUT_LAYER )
86
86
ogrLayer = ogrConnectionString (inLayer )[1 :- 1 ]
87
87
layername = "'" + ogrLayerName (inLayer ) + "'"
88
- operation = self .OPERATIONLIST [ self . getParameterValue (self .OPERATION )]
88
+ operation = self .getParameterValue (self .OPERATION )
89
89
geometry = unicode (self .getParameterValue (self .GEOMETRY ))
90
90
distance = unicode (self .getParameterValue (self .RADIUS ))
91
91
leftright = self .LEFTRIGHTLIST [self .getParameterValue (self .LEFTRIGHT )]
@@ -104,12 +104,12 @@ def getConsoleCommands(self):
104
104
arguments .append (ogrLayer )
105
105
arguments .append (ogrLayerName (inLayer ))
106
106
if dissolveall or field != 'None' :
107
- if operation == 'Single Side Buffer' :
107
+ if operation == 0 :
108
108
arguments .append ('-dialect sqlite -sql "SELECT ST_Union(ST_SingleSidedBuffer(' )
109
109
else :
110
110
arguments .append ('-dialect sqlite -sql "SELECT ST_Union(ST_OffsetCurve(' )
111
111
else :
112
- if operation == 'Single Side Buffer' :
112
+ if operation == 0 :
113
113
arguments .append ('-dialect sqlite -sql "SELECT ST_SingleSidedBuffer(' )
114
114
else :
115
115
arguments .append ('-dialect sqlite -sql "SELECT ST_OffsetCurve(' )
@@ -118,14 +118,26 @@ def getConsoleCommands(self):
118
118
arguments .append (distance )
119
119
if dissolveall or field != 'None' :
120
120
if leftright == 'Left' :
121
- arguments .append (',0)),*' )
121
+ if operation == 0 :
122
+ arguments .append (',0)),*' )
123
+ else :
124
+ arguments .append (')),*' )
122
125
else :
123
- arguments .append (',1)),*' )
126
+ if operation == 0 :
127
+ arguments .append (',1)),*' )
128
+ else :
129
+ arguments .append (')),*' )
124
130
else :
125
131
if leftright == 'Left' :
126
- arguments .append (',0),*' )
132
+ if operation == 0 :
133
+ arguments .append (',0),*' )
134
+ else :
135
+ arguments .append ('),*' )
127
136
else :
128
- arguments .append (',1),*' )
137
+ if operation == 0 :
138
+ arguments .append (',1),*' )
139
+ else :
140
+ arguments .append ('),*' )
129
141
arguments .append ('FROM' )
130
142
arguments .append (layername )
131
143
if field != 'None' :
0 commit comments