Skip to content

Commit 5e0fd15

Browse files
committedApr 5, 2019
[FEATURE][processing] Add concatenate_unique support to the aggregate alg
1 parent 578c398 commit 5e0fd15

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎python/plugins/processing/algs/qgis/Aggregate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def prepareAlgorithm(self, parameters, context, feedback):
159159
aggregate = field_def['aggregate']
160160
if aggregate == 'first_value':
161161
expression = field_def['input']
162-
elif aggregate == 'concatenate':
162+
elif aggregate == 'concatenate' or aggregate == 'concatenate_unique':
163163
expression = ('{}({}, {}, {}, \'{}\')'
164164
.format(field_def['aggregate'],
165165
field_def['input'],

‎python/plugins/processing/tests/testdata/expected/aggregate_all.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ogr:aggregate_all fid="aggregate_all.0">
1515
<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>
1616
<ogr:fids>polys.0,polys.1,polys.2,polys.3,polys.4,polys.5,polys.6,polys.7,polys.9,polys.8</ogr:fids>
17-
<ogr:name>aa,dd,bb,,aa,bb,bb,cc,dd,bb</ogr:name>
17+
<ogr:name>aa,dd,bb,,cc</ogr:name>
1818
<ogr:intval>127</ogr:intval>
1919
<ogr:floatval>-11138.1515193333</ogr:floatval>
2020
</ogr:aggregate_all>

‎python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ tests:
4848
precision: 0
4949
}, {
5050
input: 'name',
51-
aggregate: 'concatenate',
51+
aggregate: 'concatenate_unique',
5252
delimiter: ',',
5353
name: 'name',
5454
type: 10,

0 commit comments

Comments
 (0)
Please sign in to comment.