diff --git a/tests/visual_tests/grids/shield-on-line-and-avoid-edges-512-512-1.0-grid-reference.json b/tests/visual_tests/grids/shield-on-line-and-avoid-edges-512-512-1.0-grid-reference.json new file mode 100644 index 000000000..a71e4f94d --- /dev/null +++ b/tests/visual_tests/grids/shield-on-line-and-avoid-edges-512-512-1.0-grid-reference.json @@ -0,0 +1,137 @@ +{ + "keys": [ + "", + "1" + ], + "data": {}, + "grid": [ + " ", + " ", + " ", + " !!!! ", + " !!!!!!!! ", + " !!!!!!!!! ", + " !!!!!!!!!!! ", + " !!!!!!!!!!! ", + " !!!!!!!!!!! ", + " !!!!!!!!!!!!! ", + " !!!!!!!!!!!!! ", + " !!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! !!!!", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! !!!!!", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! !!!!!!", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! !!!!!!", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!! !!!!!!", + " !!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! !!!!!!!!!", + " !!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! !!!!!!!!!!", + " !!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!! !!!!!!!!!!!", + " !!!!!!!!!!!!!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!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + "!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + "!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + "!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + "!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!! ", + "!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!! ", + "!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!! ", + "!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!! ", + "!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!! ", + "!!!!!!!! !!!!!!!!!!!!!!!!!!! ", + "!!!!!!! !!!!!!!!!!!!!!!!!! ", + "!!!!!!! !!!!!!!!!!!!!!!!! ", + "!!!!!! !!!!!!!!!!!!!!!!! ", + "!!!!!! !!!!!!!!!!!!!!! ", + "!!!!!! !!!!!!!!!!!!!! ", + "!!!!! !!!!!!!!!! ", + "!!!!! !!!!!!!!! ", + "!!!! !!!!!!! ", + " !!!!! ", + " !!! ", + " " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-1.0-agg-reference.png b/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-1.0-agg-reference.png new file mode 100644 index 000000000..504802fd9 Binary files /dev/null and b/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-1.0-cairo-reference.png b/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-1.0-cairo-reference.png new file mode 100644 index 000000000..3e9a7ddf3 Binary files /dev/null and b/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-2.0-agg-reference.png b/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-2.0-agg-reference.png new file mode 100644 index 000000000..65b3f1bb7 Binary files /dev/null and b/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-2.0-cairo-reference.png b/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-2.0-cairo-reference.png new file mode 100644 index 000000000..b8d650f6e Binary files /dev/null and b/tests/visual_tests/images/shield-on-line-and-avoid-edges-512-512-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/styles/shield-on-line-and-avoid-edges.xml b/tests/visual_tests/styles/shield-on-line-and-avoid-edges.xml new file mode 100644 index 000000000..22dd1f464 --- /dev/null +++ b/tests/visual_tests/styles/shield-on-line-and-avoid-edges.xml @@ -0,0 +1,33 @@ + + + + + line + point-placement + + csv + ../data/marker-on-line.csv + | + + + diff --git a/tests/visual_tests/test.py b/tests/visual_tests/test.py index 4c3ddee8a..145a1200d 100755 --- a/tests/visual_tests/test.py +++ b/tests/visual_tests/test.py @@ -221,6 +221,7 @@ files = { 'tiff-nodata-tolerance':{'sizes':[(512,512)]}, # https://github.com/mapnik/mapnik/issues/2202 'line-smooth-and-offset':{'sizes':[(512,512)]}, + 'shield-on-line-and-avoid-edges':{'sizes':[(512,512)]}, } class Reporting: