Skip to content

Commit

Permalink
Consolidate some relate XML unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Nov 9, 2023
1 parent 4023857 commit f883f95
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 69 deletions.
16 changes: 15 additions & 1 deletion tests/xmltester/tests/general/TestRelateAA.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
(120 140, 260 140, 260 260, 120 260, 120 140))
</b>
<test>
<op name="relate" arg3="212101212" arg1="A" arg2="B">true</op>
<op name="relate" arg3="212101212" arg1="A" arg2="B"> true </op>
</test>
<test> <op name="intersects" arg1="A" arg2="B"> true </op></test>
<test> <op name="contains" arg1="A" arg2="B"> false </op></test>
Expand Down Expand Up @@ -232,4 +232,18 @@
<test> <op name="contains" arg1="A" arg2="B"> false </op></test>
</case>

<case>
<desc>A/mA A-shells overlapping B-shell at A-vertex</desc>
<a>
POLYGON ((100 60, 140 100, 100 140, 60 100, 100 60))
</a>
<b>
MULTIPOLYGON (((80 40, 120 40, 120 80, 80 80, 80 40)), ((120 80, 160 80, 160 120, 120 120, 120 80)), ((80 120, 120 120, 120 160, 80 160, 80 120)), ((40 80, 80 80, 80 120, 40 120, 40 80)))
</b>
<test>
<op name="relate" arg3="21210F212" arg1="A" arg2="B"> true </op>
</test>
<test> <op name="intersects" arg1="A" arg2="B"> true </op></test>
</case>

</run>
27 changes: 0 additions & 27 deletions tests/xmltester/tests/general/TestRelateAC.xml

This file was deleted.

41 changes: 0 additions & 41 deletions tests/xmltester/tests/general/TestRelateLC.xml

This file was deleted.

26 changes: 26 additions & 0 deletions tests/xmltester/tests/general/TestRelateLL.xml
Original file line number Diff line number Diff line change
Expand Up @@ -365,4 +365,30 @@
<test><op name="within" arg1="A" arg2="B"> false </op></test>
</case>

<case>
<desc>LmL - topographically equal with no boundary</desc>
<a>
LINESTRING(0 0, 0 50, 50 50, 50 0, 0 0)
</a>
<b>
MULTILINESTRING((0 0, 0 50), (0 50, 50 50), (50 50, 50 0), (50 0, 0 0))
</b>
<test>
<op name="relate" arg3="1FFFFFFF2" arg1="A" arg2="B"> true </op>
</test>
</case>

<case>
<desc>LmL - equal with boundary intersection</desc>
<a>
LINESTRING(0 0, 60 0, 60 60, 60 0, 120 0)
</a>
<b>
MULTILINESTRING((0 0, 60 0), (60 0, 120 0), (60 0, 60 60))
</b>
<test>
<op name="relate" arg3="10FF0FFF2" arg1="A" arg2="B"> true </op>
</test>
</case>

</run>

0 comments on commit f883f95

Please sign in to comment.