From bebe5e9e3acbbf2ea33d4df8ccda1149eb21f0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20S=C3=A1nchez=20Ortega?= Date: Fri, 22 Aug 2014 16:26:02 +0200 Subject: [PATCH] Added test case for winding order of polygon rings. See mapnik/mapnik#2371 and mapbox/tilemill#2110. --- ...ding-order-300-300-1.0-grid-reference.json | 84 ++++++++++++++++++ ...inding-order-300-300-1.0-agg-reference.png | Bin 0 -> 423 bytes ...ding-order-300-300-1.0-cairo-reference.png | Bin 0 -> 488 bytes ...inding-order-300-300-2.0-agg-reference.png | Bin 0 -> 377 bytes ...ding-order-300-300-2.0-cairo-reference.png | Bin 0 -> 377 bytes .../styles/polygon-winding-order.xml | 61 +++++++++++++ 6 files changed, 145 insertions(+) create mode 100644 tests/visual_tests/grids/polygon-winding-order-300-300-1.0-grid-reference.json create mode 100644 tests/visual_tests/images/polygon-winding-order-300-300-1.0-agg-reference.png create mode 100644 tests/visual_tests/images/polygon-winding-order-300-300-1.0-cairo-reference.png create mode 100644 tests/visual_tests/images/polygon-winding-order-300-300-2.0-agg-reference.png create mode 100644 tests/visual_tests/images/polygon-winding-order-300-300-2.0-cairo-reference.png create mode 100644 tests/visual_tests/styles/polygon-winding-order.xml diff --git a/tests/visual_tests/grids/polygon-winding-order-300-300-1.0-grid-reference.json b/tests/visual_tests/grids/polygon-winding-order-300-300-1.0-grid-reference.json new file mode 100644 index 000000000..2d2a4af9f --- /dev/null +++ b/tests/visual_tests/grids/polygon-winding-order-300-300-1.0-grid-reference.json @@ -0,0 +1,84 @@ +{ + "keys": [ + "", + "1" + ], + "data": {}, + "grid": [ + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/images/polygon-winding-order-300-300-1.0-agg-reference.png b/tests/visual_tests/images/polygon-winding-order-300-300-1.0-agg-reference.png new file mode 100644 index 0000000000000000000000000000000000000000..cb3e0b1910c58f0e6b546e2b2e303d5782633bda GIT binary patch literal 423 zcmeAS@N?(olHy`uVBq!ia0y~yVAKI&7G|JGckpC4ASDst6XFV_8yFZ4Ffcp-A_av5 z4h{NpJR{H62dZOs&4*uSuX+(rmi`o zdilcCJ9QxIi3Ychap^8=zxE?|y4(gB_%~a$%0TVwo^v4g6e@Fa;|JNx*IY32PW!q% v7G}VP4O)>iy_YT2-ubtwwY7CC`!(^5n%!on-K-A-L!80W)z4*}Q$iB}5qq)1 literal 0 HcmV?d00001 diff --git a/tests/visual_tests/images/polygon-winding-order-300-300-1.0-cairo-reference.png b/tests/visual_tests/images/polygon-winding-order-300-300-1.0-cairo-reference.png new file mode 100644 index 0000000000000000000000000000000000000000..2003b05f6997ff95108affecd8090a731eb760c5 GIT binary patch literal 488 zcmeAS@N?(olHy`uVBq!ia0y~yVAKI&7G|JGckpC4AY~BX6XFV_8yFZCF)-|AU^u|Q zaD;*3E(60OAd-{2tE6Spe{a#rbY1mk^P`7g;8e=h)ft=LJq=Rtin#pO@{(pj zc(D4Z2;b+jt3qESF850S8G#Sf8f1%Gf2!lyCY zFZbME*IZLBd$M=^x|?f0!mKBX)=Iu9I`!zU3;l8%VBp{E)bJ3o)i3urZ~fG-qJtl- zkxy04tIGnru*?P0BPwUKF sQ;D#Wchj%t_oh=5*Kz~FYNprB)qA<`T|N*w4;Y3Fp00i_>zopr06wvf_W%F@ literal 0 HcmV?d00001 diff --git a/tests/visual_tests/images/polygon-winding-order-300-300-2.0-cairo-reference.png b/tests/visual_tests/images/polygon-winding-order-300-300-2.0-cairo-reference.png new file mode 100644 index 0000000000000000000000000000000000000000..13651ed9351595608b6ddd76b337cf4976e0154f GIT binary patch literal 377 zcmeAS@N?(olHy`uVBq!ia0y~yVAKI&7G|JGckpC4AjK2l6XFV_8yFb=14$q#oAVE- zNW;^`F{EP7+dBt24;u)$I&K#z7uemrP0BPwUKF sQ;D#Wchj%t_oh=5*Kz~FYNprB)qA<`T|N*w4;Y3Fp00i_>zopr06wvf_W%F@ literal 0 HcmV?d00001 diff --git a/tests/visual_tests/styles/polygon-winding-order.xml b/tests/visual_tests/styles/polygon-winding-order.xml new file mode 100644 index 000000000..e949e7d7a --- /dev/null +++ b/tests/visual_tests/styles/polygon-winding-order.xml @@ -0,0 +1,61 @@ + + + + + + + + frame + + csv + +wkt|name +Polygon((-75.0 -75.0, -75.0 75.0, 35.0 75.0, 35.0 -75.0, -75.0 -75.0))|bounds + + + + + + + + polygon + + geojson + { +"type": "FeatureCollection", +"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, + +"features": [ +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": + [ [ [ 30, -20 ], [ -70, -20 ], [ -70, -70 ], [ 30, -70 ], [ 30, -20 ] ], + [ [ -60, -30 ], [ -30, -30 ], [ -30, -60 ], [ -60, -60 ], [ -60, -30 ] ], + [ [ -10, -30 ], [ -10, -60 ], [ 20, -60 ], [ 20, -30 ], [ -10, -30 ] ] + ] } }, +{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": + [ [ [ -70, 70 ], [ 30, 70 ], [ 30, 20 ], [ -70, 20 ], [ -70, 70 ] ], + [ [ -60, 60 ], [ -30, 60 ], [ -30, 30 ], [ -60, 30 ], [ -60, 60 ] ], + [ [ 20, 30 ], [ 20, 60 ], [ -10, 60 ], [ -10, 30 ], [ 20, 30 ] ] + ] } } +] +} + + + \ No newline at end of file