| <run> |
| <precisionModel scale="1.0" offsetx="0.0" offsety="0.0"/> |
| |
| <case> |
| <desc>PP - disjoint points</desc> |
| <a> POINT(10 10) </a> |
| <b> POINT(100 100) </b> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="200"> true </op></test> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="100"> false </op></test> |
| </case> |
| |
| <case> |
| <desc>PP - overlapping points</desc> |
| <a> POINT(10 10) </a> |
| <b> POINT(10 10) </b> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="200"> true </op></test> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0"> true </op></test> |
| </case> |
| |
| <case> |
| <desc>PL - point on linestring</desc> |
| <a> POINT (340 200) </a> |
| <b> LINESTRING (80 280, 340 200, 80 80) </b> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0"> true </op></test> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="10"> true </op></test> |
| </case> |
| |
| <case> |
| <desc>PL - point not on linestring</desc> |
| <a> LINESTRING (100 100, 200 100, 200 200, 100 200, 100 100) </a> |
| <b> POINT (10 10) </b> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="128"> true </op></test> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="127"> false </op></test> |
| </case> |
| |
| <case> |
| <desc>PA - point inside polygon</desc> |
| <a> POINT (240 160) </a> |
| <b> POLYGON ((100 260, 340 180, 100 60, 180 160, 100 260)) </b> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0"> true </op></test> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="10"> true </op></test> |
| </case> |
| |
| <case> |
| <desc>mPA - points outside polygon</desc> |
| <a> POLYGON ((200 180, 60 140, 60 260, 200 180)) </a> |
| <b> MULTIPOINT ((140 280), (140 320)) </b> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="60"> true </op></test> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="57"> false </op></test> |
| </case> |
| |
| <case> |
| <desc>LL - disjoint linestrings</desc> |
| <a> LINESTRING (40 300, 240 260, 60 160, 140 60) </a> |
| <b> LINESTRING (140 360, 260 280, 240 120, 120 160) </b> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="18"> true </op></test> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="17"> false </op></test> |
| </case> |
| |
| <case> |
| <desc>LL - crossing linestrings</desc> |
| <a> LINESTRING (40 300, 280 220, 60 160, 140 60) </a> |
| <b> LINESTRING (140 360, 260 280, 240 120, 120 160) </b> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0"> true </op></test> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="10"> true </op></test> |
| </case> |
| |
| <case> |
| <desc>AA - overlapping polygons</desc> |
| <a> POLYGON ((60 260, 260 180, 100 60, 60 160, 60 260)) </a> |
| <b> POLYGON ((220 280, 120 160, 300 60, 360 220, 220 280)) </b> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0"> true </op></test> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="10"> true </op></test> |
| </case> |
| |
| <case> |
| <desc>AA - disjoint polygons</desc> |
| <a> POLYGON ((100 320, 60 120, 240 180, 200 260, 100 320)) </a> |
| <b> POLYGON ((420 320, 280 260, 400 100, 420 320)) </b> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="72"> true </op></test> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="71"> false </op></test> |
| </case> |
| |
| <case> |
| <desc>mAmA - overlapping multipolygons</desc> |
| <a> MULTIPOLYGON (((40 240, 160 320, 40 380, 40 240)), ((100 240, 240 60, 40 40, 100 240))) </a> |
| <b> MULTIPOLYGON (((220 280, 120 160, 300 60, 360 220, 220 280)), ((240 380, 280 300, 420 340, 240 380))) </b> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="0"> true </op></test> |
| <test><op name="isWithinDistance" arg1="A" arg2="B" arg3="10"> true </op></test> |
| </case> |
| |
| </run> |