<run>
<desc>Tests for OverlayNG operations with point inputs.
Covers topological situations with no precision collapse.
Uses a floating precision model.
</desc>
<case>
  <desc>PP - same point</desc>
  <a>
POINT (10 10)
  </a>
  <b>
POINT (10 10)
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
POINT (10 10)
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
POINT (10 10)
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
POINT EMPTY
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
POINT EMPTY
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
POINT EMPTY
  </op></test>
</case>

<case>
  <desc>PP - different point</desc>
  <a>
POINT (10 10)
  </a>
  <b>
POINT (10 20)
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
POINT EMPTY
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
MULTIPOINT ((10 10), (10 20))
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
POINT (10 10)
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
POINT (10 20)
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
MULTIPOINT ((10 10), (10 20))
  </op></test>
</case>

<case>
  <desc>mPP - one point same</desc>
  <a>
MULTIPOINT ((10 10), (10 20))
  </a>
  <b>
POINT (10 10)
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
POINT (10 10)
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
MULTIPOINT ((10 10), (10 20))
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
POINT (10 20)
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
POINT EMPTY
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
POINT (10 20)
  </op></test>
</case>

<case>
  <desc>mPmP - all points same</desc>
  <a>
MULTIPOINT ((10 10), (10 20))
  </a>
  <b>
MULTIPOINT ((10 10), (10 20))
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
MULTIPOINT ((10 10), (10 20))
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
MULTIPOINT ((10 10), (10 20))
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
POINT EMPTY
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
POINT EMPTY
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
POINT EMPTY
  </op></test>
</case>

<case>
  <desc>mPmP - different points</desc>
  <a>
MULTIPOINT ((10 10), (20 20))
  </a>
  <b>
MULTIPOINT ((10 20), (20 10))
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
POINT EMPTY
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
MULTIPOINT ((10 10), (10 20), (20 10), (20 20))
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
MULTIPOINT ((10 10), (20 20))
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
MULTIPOINT ((10 20), (20 10))
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
MULTIPOINT ((10 10), (10 20), (20 10), (20 20))
  </op></test>
</case>

<case>
  <desc>PL - overlapping</desc>
  <a>
POINT (10 10)
  </a>
  <b>
LINESTRING (10 10, 20 20)
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
POINT (10 10)
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
LINESTRING (10 10, 20 20)
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
POINT EMPTY
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
LINESTRING (10 10, 20 20)
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
LINESTRING (10 10, 20 20)
  </op></test>
</case>

<case>
  <desc>PL - disjoint</desc>
  <a>
POINT (10 10)
  </a>
  <b>
LINESTRING (10 20, 20 20)
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
POINT EMPTY
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
GEOMETRYCOLLECTION (LINESTRING (10 20, 20 20), POINT (10 10))
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
POINT (10 10)
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
LINESTRING (10 20, 20 20)
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
GEOMETRYCOLLECTION (LINESTRING (10 20, 20 20), POINT (10 10))
  </op></test>
</case>

<case>
  <desc>mPL - partially overlapping</desc>
  <a>
MULTIPOINT ((10 10), (10 20))
  </a>
  <b>
LINESTRING (10 10, 20 20)
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
POINT (10 10)
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
GEOMETRYCOLLECTION (LINESTRING (10 10, 20 20), POINT (10 20))
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
POINT (10 20)
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
LINESTRING (10 10, 20 20)
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
GEOMETRYCOLLECTION (LINESTRING (10 10, 20 20), POINT (10 20))
  </op></test>
</case>

<case>
  <desc>PA - disjoint</desc>
  <a>
POINT (10 10)
  </a>
  <b>
POLYGON ((15 15, 15 20, 20 20, 20 15, 15 15))
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
POINT EMPTY
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
GEOMETRYCOLLECTION (POLYGON ((20 20, 20 15, 15 15, 15 20, 20 20)), POINT (10 10))
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
POINT (10 10)
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
POLYGON ((15 15, 15 20, 20 20, 20 15, 15 15))
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
GEOMETRYCOLLECTION (POLYGON ((20 20, 20 15, 15 15, 15 20, 20 20)), POINT (10 10))
  </op></test>
</case>

<case>
  <desc>PA - overlapping at vertex</desc>
  <a>
POINT (10 10)
  </a>
  <b>
POLYGON ((20 20, 20 10, 10 10, 10 20, 20 20))
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
POINT (10 10)
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
POLYGON ((20 20, 20 10, 10 10, 10 20, 20 20))
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
POINT EMPTY
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
POLYGON ((20 20, 20 10, 10 10, 10 20, 20 20))
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
POLYGON ((20 20, 20 10, 10 10, 10 20, 20 20))
  </op></test>
</case>

<case>
  <desc>PA - overlapping in interior</desc>
  <a>
POINT (10 10)
  </a>
  <b>
POLYGON ((5 15, 15 15, 15 5, 5 5, 5 15))
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
POINT (10 10)
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
POLYGON ((5 15, 15 15, 15 5, 5 5, 5 15))
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
POINT EMPTY
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
POLYGON ((5 15, 15 15, 15 5, 5 5, 5 15))
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
POLYGON ((5 15, 15 15, 15 5, 5 5, 5 15))
  </op></test>
</case>

<case>
  <desc>mPmA - overlapping and disjoint</desc>
  <a>
MULTIPOINT ((10 10), (20 20))
  </a>
  <b>
MULTIPOLYGON (((5 15, 15 15, 15 5, 5 5, 5 15)), ((20 15, 30 15, 30 5, 20 5, 20 15)))
  </b>
<test>  <op name="intersectionNG" arg1="A" arg2="B">
POINT (10 10)
  </op></test>
<test>  <op name="unionNG" arg1="A" arg2="B">
GEOMETRYCOLLECTION (POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5)), POLYGON ((20 5, 20 15, 30 15, 30 5, 20 5)), POINT (20 20))
  </op></test>
<test>  <op name="differenceNG" arg1="A" arg2="B">
POINT (20 20)
  </op></test>
<test>  <op name="differenceNG" arg1="B" arg2="A">
MULTIPOLYGON (((5 5, 5 15, 15 15, 15 5, 5 5)), ((20 5, 20 15, 30 15, 30 5, 20 5)))
  </op></test>
<test>  <op name="symdifferenceNG" arg1="A" arg2="B">
GEOMETRYCOLLECTION (POLYGON ((5 5, 5 15, 15 15, 15 5, 5 5)), POLYGON ((20 5, 20 15, 30 15, 30 5, 20 5)), POINT (20 20))
  </op></test>
</case>

</run>