From c25907010228c1c5594e949362beb539c3639aaf Mon Sep 17 00:00:00 2001 From: matteo Date: Thu, 12 Jan 2017 16:57:39 +0100 Subject: [PATCH] processing single to multi test --- .../testdata/custom/single_part_poly.gfs | 21 +++++++ .../testdata/custom/single_part_poly.gml | 56 +++++++++++++++++++ .../testdata/expected/single_to_multi.gfs | 21 +++++++ .../testdata/expected/single_to_multi.gml | 38 +++++++++++++ .../tests/testdata/qgis_algorithm_tests.yaml | 12 ++++ 5 files changed, 148 insertions(+) create mode 100644 python/plugins/processing/tests/testdata/custom/single_part_poly.gfs create mode 100644 python/plugins/processing/tests/testdata/custom/single_part_poly.gml create mode 100644 python/plugins/processing/tests/testdata/expected/single_to_multi.gfs create mode 100644 python/plugins/processing/tests/testdata/expected/single_to_multi.gml diff --git a/python/plugins/processing/tests/testdata/custom/single_part_poly.gfs b/python/plugins/processing/tests/testdata/custom/single_part_poly.gfs new file mode 100644 index 00000000000..242fb31879e --- /dev/null +++ b/python/plugins/processing/tests/testdata/custom/single_part_poly.gfs @@ -0,0 +1,21 @@ + + + single_part_poly + single_part_poly + + 3 + EPSG:4326 + + 7 + 0.21020 + 8.96288 + -5.48232 + 7.16399 + + + id + id + Integer + + + diff --git a/python/plugins/processing/tests/testdata/custom/single_part_poly.gml b/python/plugins/processing/tests/testdata/custom/single_part_poly.gml new file mode 100644 index 00000000000..bf9a0d3462d --- /dev/null +++ b/python/plugins/processing/tests/testdata/custom/single_part_poly.gml @@ -0,0 +1,56 @@ + + + + + 0.2101967462686566-5.482323358208955 + 8.9628809850746267.163993643533122 + + + + + + 0.80194134384858,7.16399364353312 0.672499728706625,4.76932376340694 5.20295625867508,4.2839177066246 5.26276665671642,6.74081294029851 0.80194134384858,7.16399364353312 + 1 + + + + + 6.30900588059701,4.21452798507463 6.00278952238806,2.60689210447761 8.4525203880597,1.81583317910448 8.96288098507463,4.26556404477612 8.24837614925373,7.04702929850746 6.30900588059701,4.21452798507463 + 1 + + + + + 3.96134713432836,1.68824302985075 3.93582910447761,-1.14425828358209 8.27389417910448,-1.50151070149254 8.120786,0.64200380597015 3.96134713432836,1.68824302985075 + 1 + + + + + 1.69024247761194,3.0406986119403 1.9454227761194,1.48409879104478 3.47650456716418,2.47930195522388 3.45098653731343,3.52554117910448 1.69024247761194,3.0406986119403 + 2 + + + + + 1.46058020895522,-2.93052037313433 2.40474731343284,-5.48232335820895 6.02830755223881,-4.35953004477612 6.411078,-2.57326795522388 1.46058020895522,-2.93052037313433 + 2 + + + + + 0.592967194029851,-0.17457314925373 1.58817035820896,-2.06290735820895 2.37922928358209,-1.3739205522388 2.63440958208955,0.284751388059703 0.592967194029851,-0.17457314925373 + 3 + + + + + 0.210196746268657,2.19860362686567 0.439859014925373,1.05029228358209 1.15436385074627,1.02477425373134 0.720557343283582,4.0359017761194 0.210196746268657,2.19860362686567 + 4 + + + diff --git a/python/plugins/processing/tests/testdata/expected/single_to_multi.gfs b/python/plugins/processing/tests/testdata/expected/single_to_multi.gfs new file mode 100644 index 00000000000..70b2931c296 --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/single_to_multi.gfs @@ -0,0 +1,21 @@ + + + single_to_multi + single_to_multi + + 6 + EPSG:4326 + + 4 + 0.21020 + 8.96288 + -5.48232 + 7.16399 + + + id + id + Integer + + + diff --git a/python/plugins/processing/tests/testdata/expected/single_to_multi.gml b/python/plugins/processing/tests/testdata/expected/single_to_multi.gml new file mode 100644 index 00000000000..de7731f91e6 --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/single_to_multi.gml @@ -0,0 +1,38 @@ + + + + + 0.210196746268657-5.48232335820895 + 8.962880985074637.16399364353312 + + + + + + 0.210196746268657,2.19860362686567 0.439859014925373,1.05029228358209 1.15436385074627,1.02477425373134 0.720557343283582,4.0359017761194 0.210196746268657,2.19860362686567 + 4 + + + + + 0.80194134384858,7.16399364353312 0.672499728706625,4.76932376340694 5.20295625867508,4.2839177066246 5.26276665671642,6.74081294029851 0.80194134384858,7.163993643533126.30900588059701,4.21452798507463 6.00278952238806,2.60689210447761 8.4525203880597,1.81583317910448 8.96288098507463,4.26556404477612 8.24837614925373,7.04702929850746 6.30900588059701,4.214527985074633.96134713432836,1.68824302985075 3.93582910447761,-1.14425828358209 8.27389417910448,-1.50151070149254 8.120786,0.64200380597015 3.96134713432836,1.68824302985075 + 1 + + + + + 1.69024247761194,3.0406986119403 1.9454227761194,1.48409879104478 3.47650456716418,2.47930195522388 3.45098653731343,3.52554117910448 1.69024247761194,3.04069861194031.46058020895522,-2.93052037313433 2.40474731343284,-5.48232335820895 6.02830755223881,-4.35953004477612 6.411078,-2.57326795522388 1.46058020895522,-2.93052037313433 + 2 + + + + + 0.592967194029851,-0.17457314925373 1.58817035820896,-2.06290735820895 2.37922928358209,-1.3739205522388 2.63440958208955,0.284751388059703 0.592967194029851,-0.17457314925373 + 3 + + + diff --git a/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml b/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml index eda625c2451..461b1f17be4 100644 --- a/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml +++ b/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml @@ -2202,3 +2202,15 @@ tests: OUTPUT: name: expected/mean_coordinates.gml type: vector + + - algorithm: qgis:singlepartstomultipart + name: single part to multipart + params: + FIELD: id + INPUT: + name: custom/single_part_poly.gml + type: vector + results: + OUTPUT: + name: expected/single_to_multi.gml + type: vector