@@ -47,9 +47,6 @@ class OffsetCurve(GdalAlgorithm):
4747 INPUT_LAYER = 'INPUT_LAYER'
4848 GEOMETRY = 'GEOMETRY'
4949 RADIUS = 'RADIUS'
50- DISSOLVEALL = 'DISSOLVEALL'
51- FIELD = 'FIELD'
52- MULTI = 'MULTI'
5350 OPTIONS = 'OPTIONS'
5451
5552 def defineCharacteristics (self ):
@@ -65,12 +62,6 @@ def defineCharacteristics(self):
6562 self .tr ('Offset distance (positive value for left-sided and negative - for right-sided)' ),
6663 - 99999999.999999 , 99999999.999999 , 1000.0 ,
6764 optional = False ))
68- self .addParameter (ParameterBoolean (self .DISSOLVEALL ,
69- self .tr ('Dissolve all results' ), False ))
70- self .addParameter (ParameterTableField (self .FIELD ,
71- self .tr ('Dissolve by attribute' ), self .INPUT_LAYER , optional = True ))
72- self .addParameter (ParameterBoolean (self .MULTI ,
73- self .tr ('Output as singlepart geometries (only used when dissolving by attribute)' ), False ))
7465 self .addParameter (ParameterString (self .OPTIONS ,
7566 self .tr ('Additional creation options (see ogr2ogr manual)' ),
7667 '' , optional = True ))
@@ -81,9 +72,6 @@ def getConsoleCommands(self):
8172 inLayer = self .getParameterValue (self .INPUT_LAYER )
8273 geometry = self .getParameterValue (self .GEOMETRY )
8374 distance = self .getParameterValue (self .RADIUS )
84- dissolveall = self .getParameterValue (self .DISSOLVEALL )
85- field = self .getParameterValue (self .FIELD )
86- multi = self .getParameterValue (self .MULTI )
8775 options = self .getParameterValue (self .OPTIONS )
8876
8977 ogrLayer = ogrConnectionString (inLayer )[1 :- 1 ]
@@ -102,19 +90,10 @@ def getConsoleCommands(self):
10290 arguments .append ('sqlite' )
10391 arguments .append ('-sql' )
10492
105- if dissolveall or field is not None :
106- sql = "SELECT ST_Union(ST_OffsetCurve({}, {})) * FROM '{}'" .format (geometry , distance , layername )
107- else :
108- sql = "SELECT ST_OffsetCurve({}, {}), * FROM '{}'" .format (geometry , distance , layername )
109-
110- if field is not None :
111- sql = '"{} GROUP BY {}"' .format (sql , field )
93+ sql = "SELECT ST_OffsetCurve({}, {}), * FROM '{}'" .format (geometry , distance , layername )
11294
11395 arguments .append (sql )
11496
115- if field is not None and multi :
116- arguments .append ('-explodecollections' )
117-
11897 if options is not None and len (options .strip ()) > 0 :
11998 arguments .append (options )
12099
0 commit comments