mirror of
https://github.com/bjornharrtell/jsts.git
synced 2026-01-25 14:17:37 +00:00
191 lines
3.7 KiB
XML
191 lines
3.7 KiB
XML
<run>
|
|
<precisionModel scale="1.0" offsetx="0.0" offsety="0.0"/>
|
|
|
|
<case>
|
|
<desc>LA - intersection at NV: {A-Bdy, A-Int} = {B-Bdy, B-Int}</desc>
|
|
<a>
|
|
LINESTRING(100 120, 100 240)
|
|
</a>
|
|
<b>
|
|
POLYGON(
|
|
(40 60, 160 60, 160 180, 40 180, 40 60))
|
|
</b>
|
|
<test>
|
|
<op name="relate" arg3="1010F0212" arg1="A" arg2="B">
|
|
true
|
|
</op>
|
|
</test>
|
|
</case>
|
|
|
|
<case>
|
|
<desc>LA - intersection at V: {A-Bdy, A-Int} = {B-Bdy, B-Int}</desc>
|
|
<a>
|
|
LINESTRING(80 80, 140 140, 200 200)
|
|
</a>
|
|
<b>
|
|
POLYGON(
|
|
(40 40, 140 40, 140 140, 40 140, 40 40))
|
|
</b>
|
|
<test>
|
|
<op name="relate" arg3="1010F0212" arg1="A" arg2="B">
|
|
true
|
|
</op>
|
|
</test>
|
|
</case>
|
|
|
|
<case>
|
|
<desc>LmA - intersection at NV, L contained in A</desc>
|
|
<a>
|
|
LINESTRING(70 50, 70 150)
|
|
</a>
|
|
<b>
|
|
MULTIPOLYGON(
|
|
(
|
|
(0 0, 0 100, 140 100, 140 0, 0 0)),
|
|
(
|
|
(20 170, 70 100, 130 170, 20 170)))
|
|
</b>
|
|
<test>
|
|
<op name="relate" arg3="10F0FF212" arg1="A" arg2="B">
|
|
true
|
|
</op>
|
|
</test>
|
|
</case>
|
|
|
|
<case>
|
|
<desc>LA - A crosses B at {shell-NV, hole-V}</desc>
|
|
<a>
|
|
LINESTRING(60 160, 150 70)
|
|
</a>
|
|
<b>
|
|
POLYGON(
|
|
(190 190, 360 20, 20 20, 190 190),
|
|
(110 110, 250 100, 140 30, 110 110))
|
|
</b>
|
|
<test>
|
|
<op name="relate" arg3="F01FF0212" arg1="A" arg2="B">
|
|
true
|
|
</op>
|
|
</test>
|
|
</case>
|
|
|
|
<case>
|
|
<desc>LA - A intersects B at {shell-NV}, B-Int, {hole-V}</desc>
|
|
<a>
|
|
LINESTRING(60 160, 150 70)
|
|
</a>
|
|
<b>
|
|
POLYGON(
|
|
(190 190, 360 20, 20 20, 190 190),
|
|
(111 110, 250 100, 140 30, 111 110))
|
|
</b>
|
|
<test>
|
|
<op name="relate" arg3="101FF0212" arg1="A" arg2="B">
|
|
true
|
|
</op>
|
|
</test>
|
|
</case>
|
|
|
|
<case>
|
|
<desc>LA - A crosses B hole at {hole1-V, hole2-NV}</desc>
|
|
<a>
|
|
LINESTRING(80 110, 170 110)
|
|
</a>
|
|
<b>
|
|
POLYGON(
|
|
(20 200, 20 20, 240 20, 240 200, 20 200),
|
|
(130 110, 60 40, 60 180, 130 110),
|
|
(130 180, 130 40, 200 110, 130 180))
|
|
</b>
|
|
<test>
|
|
<op name="relate" arg3="F01FF0212" arg1="A" arg2="B">
|
|
true
|
|
</op>
|
|
</test>
|
|
</case>
|
|
|
|
<case>
|
|
<desc>LA - A crosses B hole at {hole1-V}, B-Int, {hole2-NV}</desc>
|
|
<a>
|
|
LINESTRING(80 110, 170 110)
|
|
</a>
|
|
<b>
|
|
POLYGON(
|
|
(20 200, 20 20, 240 20, 240 200, 20 200),
|
|
(130 110, 60 40, 60 180, 130 110),
|
|
(130 180, 131 40, 200 110, 130 180))
|
|
</b>
|
|
<test>
|
|
<op name="relate" arg3="101FF0212" arg1="A" arg2="B">
|
|
true
|
|
</op>
|
|
</test>
|
|
</case>
|
|
|
|
<case>
|
|
<desc>LA - Line with endpoints in interior but crossing exterior of multipolygon</desc>
|
|
<a>
|
|
LINESTRING(160 70, 320 230)
|
|
</a>
|
|
<b>
|
|
MULTIPOLYGON(
|
|
(
|
|
(140 110, 260 110, 170 20, 50 20, 140 110)),
|
|
(
|
|
(300 270, 420 270, 340 190, 220 190, 300 270)))
|
|
</b>
|
|
<test>
|
|
<op name="relate" arg1="A" arg2="B" arg3="1010FF212">true</op>
|
|
</test>
|
|
</case>
|
|
|
|
<case>
|
|
<desc>LA - Line with a very small piece in the exterior between parts of a multipolygon</desc>
|
|
<a>
|
|
LINESTRING(100 140, 100 40)
|
|
</a>
|
|
<b>
|
|
MULTIPOLYGON(
|
|
(
|
|
(20 80, 180 79, 100 0, 20 80)),
|
|
(
|
|
(20 160, 180 160, 100 80, 20 160)))
|
|
</b>
|
|
<test>
|
|
<op name="relate" arg1="A" arg2="B" arg3="1010FF212">true</op>
|
|
</test>
|
|
</case>
|
|
|
|
<case>
|
|
<desc>LA - Line contained completely and spanning parts of multipolygon</desc>
|
|
<a>
|
|
LINESTRING(100 140, 100 40)
|
|
</a>
|
|
<b>
|
|
MULTIPOLYGON(
|
|
(
|
|
(20 80, 180 80, 100 0, 20 80)),
|
|
(
|
|
(20 160, 180 160, 100 80, 20 160)))
|
|
</b>
|
|
<test>
|
|
<op name="relate" arg1="A" arg2="B" arg3="10F0FF212">true</op>
|
|
</test>
|
|
</case>
|
|
|
|
<case>
|
|
<desc>LA - overlapping ring and triangle</desc>
|
|
<a>
|
|
LINESTRING(110 60, 20 150, 200 150, 110 60)
|
|
</a>
|
|
<b>
|
|
POLYGON(
|
|
(20 20, 200 20, 110 110, 20 20))
|
|
</b>
|
|
<test>
|
|
<op name="relate" arg1="A" arg2="B" arg3="101FFF212">true</op>
|
|
</test>
|
|
</case>
|
|
|
|
</run>
|