Skip to content
Permalink
Browse files

[FEATURE][processing] Add concatenate_unique support to the aggregate…

… alg
  • Loading branch information
nirvn committed Apr 5, 2019
1 parent 578c398 commit 5e0fd15570555f9c8ff49595fede006ee735a63f
@@ -159,7 +159,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
aggregate = field_def['aggregate']
if aggregate == 'first_value':
expression = field_def['input']
elif aggregate == 'concatenate':
elif aggregate == 'concatenate' or aggregate == 'concatenate_unique':
expression = ('{}({}, {}, {}, \'{}\')'
.format(field_def['aggregate'],
field_def['input'],
@@ -14,7 +14,7 @@
<ogr:aggregate_all fid="aggregate_all.0">
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>8.16295585412668,2.73877159309021 8.16295585412668,3.73877159309021 9.16295585412668,3.73877159309021 9.16295585412668,2.73877159309021 8.16295585412668,2.73877159309021</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>6.24145873320538,-0.054510556621882 7.24145873320538,-1.05451055662188 6.0,-1.05451055662188 6,-3 2,-1 -1,-1 -1,3 3,3 3,2 6,1 6.0,-0.295969289827257 6.24145873320538,-0.054510556621882</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4.17255278310941,4.82264875239923 4.17255278310941,5.82264875239923 5.17255278310941,5.82264875239923 5.17255278310941,4.82264875239923 4.17255278310941,4.82264875239923</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2.44337811900192,4.42360844529751 2.44337811900192,5.0 2,5 2,6 2.62072936660269,6.0 2.62072936660269,6.08867562380038 3.62072936660269,6.08867562380038 3.62072936660269,5.08867562380038 3.44337811900192,5.08867562380038 3.44337811900192,4.42360844529751 2.44337811900192,4.42360844529751</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
<ogr:fids>polys.0,polys.1,polys.2,polys.3,polys.4,polys.5,polys.6,polys.7,polys.9,polys.8</ogr:fids>
<ogr:name>aa,dd,bb,,aa,bb,bb,cc,dd,bb</ogr:name>
<ogr:name>aa,dd,bb,,cc</ogr:name>
<ogr:intval>127</ogr:intval>
<ogr:floatval>-11138.1515193333</ogr:floatval>
</ogr:aggregate_all>
@@ -48,7 +48,7 @@ tests:
precision: 0
}, {
input: 'name',
aggregate: 'concatenate',
aggregate: 'concatenate_unique',
delimiter: ',',
name: 'name',
type: 10,

0 comments on commit 5e0fd15

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