From c2559d827317fa201d1e1211b41bef00150ff6cd Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 4 Aug 2017 21:40:49 +1000 Subject: [PATCH] Add second reference layer for topocolor algorithm --- .../testdata/expected/topocolor_polys.gml | 4 +- .../testdata/expected/topocolor_polys2.gfs | 46 ++++++ .../testdata/expected/topocolor_polys2.gml | 133 ++++++++++++++++++ .../tests/testdata/qgis_algorithm_tests.yaml | 4 +- 4 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 python/plugins/processing/tests/testdata/expected/topocolor_polys2.gfs create mode 100644 python/plugins/processing/tests/testdata/expected/topocolor_polys2.gml diff --git a/python/plugins/processing/tests/testdata/expected/topocolor_polys.gml b/python/plugins/processing/tests/testdata/expected/topocolor_polys.gml index c16afe08ef6a..09ad337285b6 100644 --- a/python/plugins/processing/tests/testdata/expected/topocolor_polys.gml +++ b/python/plugins/processing/tests/testdata/expected/topocolor_polys.gml @@ -41,7 +41,7 @@ 8.23935 -3.11331 11 - 5 + 4 @@ -52,7 +52,7 @@ 8.23935 -6.11331 12 - 4 + 5 diff --git a/python/plugins/processing/tests/testdata/expected/topocolor_polys2.gfs b/python/plugins/processing/tests/testdata/expected/topocolor_polys2.gfs new file mode 100644 index 000000000000..eb07beba7512 --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/topocolor_polys2.gfs @@ -0,0 +1,46 @@ + + + topocolor_polys + topocolor_polys + + 3 + EPSG:4326 + + 11 + -0.76065 + 14.23935 + -6.11331 + 5.88669 + + + left + left + Real + + + top + top + Real + + + right + right + Real + + + bottom + bottom + Real + + + id + id + Integer + + + color_id + color_id + Integer + + + diff --git a/python/plugins/processing/tests/testdata/expected/topocolor_polys2.gml b/python/plugins/processing/tests/testdata/expected/topocolor_polys2.gml new file mode 100644 index 000000000000..c16afe08ef6a --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/topocolor_polys2.gml @@ -0,0 +1,133 @@ + + + + + -0.760650357995228-6.11330548926014 + 14.23934964200485.88669451073986 + + + + + + -0.760650357995228,-0.113305489260142 2.23934964200477,-0.113305489260142 2.23934964200477,-3.11330548926014 -0.760650357995228,-3.11330548926014 -0.760650357995228,-0.113305489260142 + -0.76065 + -0.11331 + 2.23935 + -3.11331 + 3 + 1 + + + + + -0.760650357995228,-3.11330548926014 2.23934964200477,-3.11330548926014 2.23934964200477,-6.11330548926014 -0.760650357995228,-6.11330548926014 -0.760650357995228,-3.11330548926014 + -0.76065 + -3.11331 + 2.23935 + -6.11331 + 4 + 3 + + + + + 5.23934964200477,-0.113305489260142 8.23934964200477,-0.113305489260142 8.23934964200477,-3.11330548926014 5.23934964200477,-3.11330548926014 5.23934964200477,-0.113305489260142 + 5.23935 + -0.11331 + 8.23935 + -3.11331 + 11 + 5 + + + + + 5.23934964200477,-3.11330548926014 8.23934964200477,-3.11330548926014 8.23934964200477,-6.11330548926014 5.23934964200477,-6.11330548926014 5.23934964200477,-3.11330548926014 + 5.23935 + -3.11331 + 8.23935 + -6.11331 + 12 + 4 + + + + + 8.23934964200477,-3.11330548926014 11.2393496420048,-3.11330548926014 11.2393496420048,-6.11330548926014 8.23934964200477,-6.11330548926014 8.23934964200477,-3.11330548926014 + 8.23935 + -3.11331 + 11.23935 + -6.11331 + 16 + 3 + + + + + 11.2393496420048,-0.113305489260142 14.2393496420048,-0.113305489260142 14.2393496420048,-3.11330548926014 11.2393496420048,-3.11330548926014 11.2393496420048,-0.113305489260142 + 11.23935 + -0.11331 + 14.23935 + -3.11331 + 19 + 2 + + + + + 11.2393496420048,-3.11330548926014 14.2393496420048,-3.11330548926014 14.2393496420048,-6.11330548926014 11.2393496420048,-6.11330548926014 11.2393496420048,-3.11330548926014 + 11.23935 + -3.11331 + 14.23935 + -6.11331 + 20 + 5 + + + + + 2.23934964200477,5.88669451073986 5.23934964200477,5.88669451073986 5.23934964200477,2.88669451073986 2.23934964200477,2.88669451073986 2.23934964200477,-0.113305489260142 -0.760650357995228,-0.113305489260142 -0.760650357995228,2.88669451073986 -0.760650357995228,5.88669451073986 2.23934964200477,5.88669451073986 + 2.23935 + 5.88669 + 5.23935 + 2.88669 + 5 + 3 + + + + + 5.23934964200477,2.88669451073986 8.23934964200477,2.88669451073986 11.2393496420048,2.88669451073986 11.2393496420048,-0.113305489260142 11.2393496420048,-3.11330548926014 8.23934964200477,-3.11330548926014 8.23934964200477,-0.113305489260142 5.23934964200477,-0.113305489260142 5.23934964200477,2.88669451073986 + 5.23935 + 2.88669 + 8.23935 + 10 + 1 + + + + + 2.23934964200477,2.88669451073986 5.23934964200477,2.88669451073986 5.23934964200477,-0.113305489260142 5.23934964200477,-3.11330548926014 5.23934964200477,-6.11330548926014 2.23934964200477,-6.11330548926014 2.23934964200477,-3.11330548926014 2.23934964200477,-0.113305489260142 2.23934964200477,2.88669451073986 + 2.23935 + 2.88669 + 5.23935 + 6 + 2 + + + + + 5.23934964200477,5.88669451073986 8.23934964200477,5.88669451073986 11.2393496420048,5.88669451073986 14.2393496420048,5.88669451073986 14.2393496420048,2.88669451073986 14.2393496420048,-0.113305489260142 11.2393496420048,-0.113305489260142 11.2393496420048,2.88669451073986 8.23934964200477,2.88669451073986 5.23934964200477,2.88669451073986 5.23934964200477,5.88669451073986 + 5.23935 + 5.88669 + 8.23935 + 2.88669 + 9 + 4 + + + diff --git a/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml b/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml index 297f4123497b..846d2c65b1f9 100644 --- a/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml +++ b/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml @@ -2614,8 +2614,10 @@ tests: MIN_COLORS: 4 results: OUTPUT: - name: expected/topocolor_polys.gml type: vector + name: + - expected/topocolor_polys.gml + - expected/topocolor_polys2.gml - algorithm: qgis:topologicalcoloring name: Topological coloring w/ min distance