"Fossies" - the Fresh Open Source Software Archive

Member "geotools-22.0/modules/unsupported/geometry/src/test/resources/org/geotools/geometry/xml/test-data/TestFunctionAAPrec.xml" (18 Sep 2019, 18381 Bytes) of package /linux/misc/geotools-22.0-project.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <run>
    2   <precisionModel scale="1.0" offsetx="0.0" offsety="0.0"/>
    3 
    4 <case>
    5   <desc>AA - sliver triangle, cut by polygon</desc>
    6   <a>
    7     POLYGON(
    8       (10 10, 100 10, 10 11, 10 10))
    9   </a>
   10   <b>
   11     POLYGON(
   12       (90 0, 200 0, 200 200, 90 200, 90 0))
   13   </b>
   14 <test>
   15   <op name="relate" arg3="212101212" arg1="A" arg2="B">
   16     true
   17   </op>
   18 </test>
   19 <test>
   20   <op name="intersection" arg1="A" arg2="B">
   21     LINESTRING(90 10, 100 10)
   22   </op>
   23 </test>
   24 <test>
   25   <op name="union" arg1="A" arg2="B">
   26     MULTIPOLYGON(
   27       (
   28         (90 10, 10 10, 10 11, 90 10)), 
   29       (
   30         (90 10, 90 200, 200 200, 200 0, 90 0, 90 10)))
   31   </op>
   32 </test>
   33 <test>
   34   <op name="difference" arg1="A" arg2="B">
   35     POLYGON(
   36       (90 10, 10 10, 10 11, 90 10))
   37   </op>
   38 </test>
   39 <test>
   40   <op name="symdifference" arg1="A" arg2="B">
   41     MULTIPOLYGON(
   42       (
   43         (90 10, 10 10, 10 11, 90 10)), 
   44       (
   45         (90 10, 90 200, 200 200, 200 0, 90 0, 90 10)))
   46   </op>
   47 </test>
   48 </case>
   49 
   50 <case>
   51   <desc>AA - polygon with outward sliver, cut by polygon</desc>
   52   <a>
   53     POLYGON(
   54       (100 10, 10 10, 90 11, 90 20, 100 20, 100 10))
   55   </a>
   56   <b>
   57     POLYGON(
   58       (20 20, 0 20, 0 0, 20 0, 20 20))
   59   </b>
   60 <test>
   61   <op name="relate" arg3="212101212" arg1="A" arg2="B">
   62     true
   63   </op>
   64 </test>
   65 <test>
   66   <op name="intersection" arg1="A" arg2="B">
   67     LINESTRING(20 10, 10 10)
   68   </op>
   69 </test>
   70 </case>
   71 
   72 <case>
   73   <desc>AA - narrow wedge in polygon</desc>
   74   <a>
   75     POLYGON((10 10, 50 10, 50 50, 10 50, 10 31, 49 30, 10 30, 10 10))
   76   </a>
   77   <b>
   78     POLYGON((60 40, 40 40, 40 20, 60 20, 60 40))
   79   </b>
   80 <test>
   81   <op name="relate" arg3="212101212" arg1="A" arg2="B">
   82     true
   83   </op>
   84 </test>
   85 <test>
   86   <op name="intersection" arg1="A" arg2="B">
   87     POLYGON(
   88       (50 40, 50 20, 40 20, 40 30, 40 40, 50 40))
   89   </op>
   90 </test>
   91 <test>
   92   <op name="union" arg1="A" arg2="B">
   93     POLYGON(
   94       (50 20, 50 10, 10 10, 10 30, 40 30, 10 31, 10 50, 50 50, 50 40, 
   95       60 40, 60 20, 50 20))
   96   </op>
   97 </test>
   98 <test>
   99   <op name="difference" arg1="A" arg2="B">
  100     MULTIPOLYGON(
  101       (
  102         (50 20, 50 10, 10 10, 10 30, 40 30, 40 20, 50 20)), 
  103       (
  104         (40 30, 10 31, 10 50, 50 50, 50 40, 40 40, 40 30)))
  105   </op>
  106 </test>
  107 <test>
  108   <op name="symdifference" arg1="A" arg2="B">
  109     MULTIPOLYGON(
  110       (
  111         (50 20, 50 10, 10 10, 10 30, 40 30, 40 20, 50 20)), 
  112       (
  113         (50 20, 50 40, 60 40, 60 20, 50 20)), 
  114       (
  115         (40 30, 10 31, 10 50, 50 50, 50 40, 40 40, 40 30)))
  116   </op>
  117 </test>
  118 </case>
  119 
  120 <case>
  121   <desc>AA - hole close to shell</desc>
  122   <a>
  123     POLYGON(
  124       (10 100, 10 10, 100 10, 100 100, 10 100), 
  125       (90 90, 11 90, 10 10, 90 11, 90 90))
  126   </a>
  127   <b>
  128     POLYGON(
  129       (0 30, 0 0, 30 0, 30 30, 0 30))
  130   </b>
  131 <test>
  132   <op name="relate" arg3="212101212" arg1="A" arg2="B">
  133     true
  134   </op>
  135 </test>
  136 <test>
  137   <op name="intersection" arg1="A" arg2="B">
  138     MULTILINESTRING(
  139       (10 30, 10 10), 
  140       (10 10, 30 10))
  141   </op>
  142 </test>
  143 <test>
  144   <op name="union" arg1="A" arg2="B">
  145     MULTIPOLYGON(
  146       (
  147         (10 30, 10 100, 100 100, 100 10, 30 10, 90 11, 90 90, 11 90, 10 30)), 
  148       (
  149         (30 10, 30 0, 0 0, 0 30, 10 30, 30 30, 30 10)))
  150   </op>
  151 </test>
  152 <test>
  153   <op name="difference" arg1="A" arg2="B">
  154     POLYGON(
  155       (10 30, 10 100, 100 100, 100 10, 30 10, 90 11, 90 90, 11 90, 10 30))
  156   </op>
  157 </test>
  158 <test>
  159   <op name="symdifference" arg1="A" arg2="B">
  160     MULTIPOLYGON(
  161       (
  162         (10 30, 10 100, 100 100, 100 10, 30 10, 90 11, 90 90, 11 90, 10 30)), 
  163       (
  164         (30 10, 30 0, 0 0, 0 30, 10 30, 30 30, 30 10)))
  165   </op>
  166 </test>
  167 </case>
  168 
  169 <case>
  170   <desc>mAA - shells close together</desc>
  171   <a>
  172     MULTIPOLYGON(
  173       (
  174         (0 0, 100 0, 100 20, 0 20, 0 0)), 
  175       (
  176         (0 40, 0 21, 100 20, 100 40, 0 40)))
  177   </a>
  178   <b>
  179     POLYGON(
  180       (110 30, 90 30, 90 10, 110 10, 110 30))
  181   </b>
  182 <test>
  183   <op name="relate" arg3="212101212" arg1="A" arg2="B">
  184     true
  185   </op>
  186 </test>
  187 <test>
  188   <op name="intersection" arg1="A" arg2="B">
  189     GEOMETRYCOLLECTION(
  190       LINESTRING(100 20, 90 20), 
  191       POLYGON(
  192         (100 20, 100 10, 90 10, 90 20, 90 30, 100 30, 100 20)))
  193   </op>
  194 </test>
  195 <test>
  196   <op name="union" arg1="A" arg2="B">
  197     POLYGON(
  198       (100 10, 100 0, 0 0, 0 20, 90 20, 0 21, 0 40, 100 40, 100 30, 
  199       110 30, 110 10, 100 10))
  200   </op>
  201 </test>
  202 <test>
  203   <op name="difference" arg1="A" arg2="B">
  204     MULTIPOLYGON(
  205       (
  206         (100 10, 100 0, 0 0, 0 20, 90 20, 90 10, 100 10)), 
  207       (
  208         (90 20, 0 21, 0 40, 100 40, 100 30, 90 30, 90 20)))
  209   </op>
  210 </test>
  211 <test>
  212   <op name="symdifference" arg1="A" arg2="B">
  213     MULTIPOLYGON(
  214       (
  215         (100 10, 100 0, 0 0, 0 20, 90 20, 90 10, 100 10)), 
  216       (
  217         (100 10, 100 20, 100 30, 110 30, 110 10, 100 10)), 
  218       (
  219         (90 20, 0 21, 0 40, 100 40, 100 30, 90 30, 90 20)))
  220   </op>
  221 </test>
  222 </case>
  223 
  224 <case>
  225   <desc>AA - A sliver triangle cutting all the way across B</desc>
  226   <a>
  227     POLYGON(
  228       (100 10, 0 10, 100 11, 100 10))
  229   </a>
  230   <b>
  231     POLYGON(
  232       (20 20, 0 20, 0 0, 20 0, 20 20))
  233   </b>
  234 <test>
  235   <op name="relate" arg3="212101212" arg1="A" arg2="B">
  236     true
  237   </op>
  238 </test>
  239 <test>
  240   <op name="intersection" arg1="A" arg2="B">
  241     LINESTRING(20 10, 0 10)
  242   </op>
  243 </test>
  244 <test>
  245   <op name="union" arg1="A" arg2="B">
  246     MULTIPOLYGON(
  247       (
  248         (100 10, 20 10, 100 11, 100 10)), 
  249       (
  250         (0 10, 0 20, 20 20, 20 10, 20 0, 0 0, 0 10)))
  251   </op>
  252 </test>
  253 <test>
  254   <op name="difference" arg1="A" arg2="B">
  255     POLYGON(
  256       (100 10, 20 10, 100 11, 100 10))
  257   </op>
  258 </test>
  259 <test>
  260   <op name="symdifference" arg1="A" arg2="B">
  261     MULTIPOLYGON(
  262       (
  263         (100 10, 20 10, 100 11, 100 10)), 
  264       (
  265         (0 10, 0 20, 20 20, 20 10, 20 0, 0 0, 0 10)))
  266   </op>
  267 </test>
  268 </case>
  269 
  270 <case>
  271   <desc>AA - A polygon with sliver cutting all the way across B</desc>
  272   <a>
  273     POLYGON(
  274       (100 10, 0 10, 90 11, 90 20, 100 20, 100 10))
  275   </a>
  276   <b>
  277     POLYGON(
  278       (20 20, 0 20, 0 0, 20 0, 20 20))
  279   </b>
  280 <test>
  281   <op name="relate" arg3="212101212" arg1="A" arg2="B">
  282     true
  283   </op>
  284 </test>
  285 <test>
  286   <op name="intersection" arg1="A" arg2="B">
  287     LINESTRING(20 10, 0 10)
  288   </op>
  289 </test>
  290 <test>
  291   <op name="union" arg1="A" arg2="B">
  292     MULTIPOLYGON(
  293       (
  294         (100 10, 20 10, 90 11, 90 20, 100 20, 100 10)), 
  295       (
  296         (0 10, 0 20, 20 20, 20 10, 20 0, 0 0, 0 10)))
  297   </op>
  298 </test>
  299 </case>
  300 
  301 <case>
  302   <desc>AA - hole close to shell, B coincident with A</desc>
  303   <a>
  304     POLYGON(
  305       (10 100, 10 10, 100 10, 100 100, 10 100), 
  306       (90 90, 11 90, 10 10, 90 11, 90 90))
  307   </a>
  308   <b>
  309     POLYGON(
  310       (10 30, 10 0, 30 10, 30 30, 10 30))
  311   </b>
  312 <test>
  313   <op name="relate" arg3="212111212" arg1="A" arg2="B">
  314     true
  315   </op>
  316 </test>
  317 <test>
  318   <op name="intersection" arg1="A" arg2="B">
  319     MULTILINESTRING(
  320       (10 30, 10 10), 
  321       (10 10, 30 10))
  322   </op>
  323 </test>
  324 <test>
  325   <op name="union" arg1="A" arg2="B">
  326     MULTIPOLYGON(
  327       (
  328         (10 30, 10 100, 100 100, 100 10, 30 10, 90 11, 90 90, 11 90, 10 30)), 
  329       (
  330         (10 10, 10 30, 30 30, 30 10, 10 0, 10 10)))
  331   </op>
  332 </test>
  333 <test>
  334   <op name="difference" arg1="A" arg2="B">
  335     POLYGON(
  336       (10 30, 10 100, 100 100, 100 10, 30 10, 90 11, 90 90, 11 90, 10 30))
  337   </op>
  338 </test>
  339 <test>
  340   <op name="symdifference" arg1="A" arg2="B">
  341     MULTIPOLYGON(
  342       (
  343         (10 30, 10 100, 100 100, 100 10, 30 10, 90 11, 90 90, 11 90, 10 30)), 
  344       (
  345         (10 10, 10 30, 30 30, 30 10, 10 0, 10 10)))
  346   </op>
  347 </test>
  348 </case>
  349 
  350 <case>
  351   <desc>AA - A hole close to shell, B coincident with A</desc>
  352   <a>
  353     POLYGON(
  354       (10 100, 10 10, 100 10, 100 100, 10 100), 
  355       (90 90, 11 90, 10 10, 90 11, 90 90))
  356   </a>
  357   <b>
  358     POLYGON(
  359       (10 30, 10 10, 30 10, 30 30, 10 30))
  360   </b>
  361 <test>
  362   <op name="relate" arg3="212111212" arg1="A" arg2="B">
  363     true
  364   </op>
  365 </test>
  366 <test>
  367   <op name="intersection" arg1="A" arg2="B">
  368     MULTILINESTRING(
  369       (10 30, 10 10), 
  370       (10 10, 30 10))
  371   </op>
  372 </test>
  373 <test>
  374   <op name="union" arg1="A" arg2="B">
  375     MULTIPOLYGON(
  376       (
  377         (10 30, 10 100, 100 100, 100 10, 30 10, 90 11, 90 90, 11 90, 10 30)), 
  378       (
  379         (10 10, 10 30, 30 30, 30 10, 10 10)))
  380   </op>
  381 </test>
  382 <test>
  383   <op name="difference" arg1="A" arg2="B">
  384     POLYGON(
  385       (10 30, 10 100, 100 100, 100 10, 30 10, 90 11, 90 90, 11 90, 10 30))
  386   </op>
  387 </test>
  388 <test>
  389   <op name="symdifference" arg1="A" arg2="B">
  390     MULTIPOLYGON(
  391       (
  392         (10 30, 10 100, 100 100, 100 10, 30 10, 90 11, 90 90, 11 90, 10 30)), 
  393       (
  394         (10 10, 10 30, 30 30, 30 10, 10 10)))
  395   </op>
  396 </test>
  397 </case>
  398 
  399 <case>
  400   <desc>AA - B hole close to shell, A coincident with B</desc>
  401   <a>
  402     POLYGON(
  403       (10 30, 10 10, 30 10, 30 30, 10 30))
  404   </a>
  405   <b>
  406     POLYGON(
  407       (10 100, 10 10, 100 10, 100 100, 10 100), 
  408       (90 90, 11 90, 10 10, 90 11, 90 90))
  409   </b>
  410 <test>
  411   <op name="relate" arg3="212111212" arg1="A" arg2="B">
  412     true
  413   </op>
  414 </test>
  415 <test>
  416   <op name="intersection" arg1="A" arg2="B">
  417     MULTILINESTRING(
  418       (10 30, 10 10), 
  419       (10 10, 30 10))
  420   </op>
  421 </test>
  422 <test>
  423   <op name="union" arg1="A" arg2="B">
  424     MULTIPOLYGON(
  425       (
  426         (10 30, 10 100, 100 100, 100 10, 30 10, 90 11, 90 90, 11 90, 10 30)), 
  427       (
  428         (10 10, 10 30, 30 30, 30 10, 10 10)))
  429   </op>
  430 </test>
  431 <test>
  432   <op name="difference" arg1="A" arg2="B">
  433     POLYGON(
  434       (10 10, 10 30, 30 30, 30 10, 10 10))
  435   </op>
  436 </test>
  437 <test>
  438   <op name="symdifference" arg1="A" arg2="B">
  439     MULTIPOLYGON(
  440       (
  441         (10 30, 10 100, 100 100, 100 10, 30 10, 90 11, 90 90, 11 90, 10 30)), 
  442       (
  443         (10 10, 10 30, 30 30, 30 10, 10 10)))
  444   </op>
  445 </test>
  446 </case>
  447 
  448 <case>
  449   <desc>AA - B sliver crossing A triangle in line segment with length &lt; 1</desc>
  450   <a>
  451     POLYGON(
  452       (0 0, 200 0, 0 198, 0 0))
  453   </a>
  454   <b>
  455     POLYGON(
  456       (280 60, 139 60, 280 70, 280 60))
  457   </b>
  458 <test>
  459   <op name="relate" arg3="212101212" arg1="A" arg2="B">
  460     true
  461   </op>
  462 </test>
  463 <test>
  464   <op name="intersection" arg1="A" arg2="B">
  465     POINT(139 60)
  466   </op>
  467 </test>
  468 <test>
  469   <op name="union" arg1="A" arg2="B">
  470     MULTIPOLYGON(
  471       (
  472         (139 60, 200 0, 0 0, 0 198, 139 60)), 
  473       (
  474         (280 60, 139 60, 280 70, 280 60)))
  475   </op>
  476 </test>
  477 <test>
  478   <op name="difference" arg1="A" arg2="B">
  479     POLYGON(
  480       (139 60, 200 0, 0 0, 0 198, 139 60))
  481   </op>
  482 </test>
  483 <test>
  484   <op name="symdifference" arg1="A" arg2="B">
  485     MULTIPOLYGON(
  486       (
  487         (139 60, 200 0, 0 0, 0 198, 139 60)), 
  488       (
  489         (280 60, 139 60, 280 70, 280 60)))
  490   </op>
  491 </test>
  492 </case>
  493 
  494 <case>
  495   <desc>AA - sliver triangles, at angle to each other</desc>
  496   <a>
  497     POLYGON(
  498       (0 0, 140 10, 0 20, 0 0))
  499   </a>
  500   <b>
  501     POLYGON(
  502       (280 0, 139 10, 280 1, 280 0))
  503   </b>
  504 <test>
  505   <op name="intersection" arg1="A" arg2="B">
  506     LINESTRING(140 10, 139 10)
  507   </op>
  508 </test>
  509 </case>
  510 
  511 <case>
  512   <desc>AA - sliver triangle with multiple intersecting boxes</desc>
  513   <a>
  514     MULTIPOLYGON(
  515       (
  516         (1 4, 1 1, 2 1, 2 4, 1 4)), 
  517       (
  518         (3 4, 3 1, 4 1, 4 4, 3 4)), 
  519       (
  520         (5 4, 5 1, 6 1, 6 4, 5 4)), 
  521       (
  522         (7 4, 7 1, 8 1, 8 4, 7 4)), 
  523       (
  524         (9 4, 9 1, 10 1, 10 4, 9 4)))
  525   </a>
  526   <b>
  527     POLYGON(
  528       (0 2, 11 3, 11 2, 0 2))
  529   </b>
  530 <test>
  531   <op name="convexhull" arg1="A">
  532     POLYGON(
  533       (1 1, 1 4, 10 4, 10 1, 1 1))
  534   </op>
  535 </test>
  536 <test>
  537   <op name="intersection" arg1="A" arg2="B">
  538     GEOMETRYCOLLECTION(
  539       LINESTRING(1 2, 2 2), 
  540       LINESTRING(3 2, 4 2), 
  541       POLYGON(
  542         (6 3, 6 2, 5 2, 6 3)), 
  543       POLYGON(
  544         (7 2, 7 3, 8 3, 8 2, 7 2)), 
  545       POLYGON(
  546         (9 2, 9 3, 10 3, 10 2, 9 2)))
  547   </op>
  548 </test>
  549 <test>
  550   <op name="union" arg1="A" arg2="B">
  551 GEOMETRYCOLLECTION(
  552   LINESTRING(0 2, 1 2), 
  553   LINESTRING(2 2, 3 2), 
  554   LINESTRING(4 2, 5 2), 
  555   POLYGON(
  556     (1 2, 1 4, 2 4, 2 2, 2 1, 1 1, 1 2)), 
  557   POLYGON(
  558     (3 2, 3 4, 4 4, 4 2, 4 1, 3 1, 3 2)), 
  559   POLYGON(
  560     (5 2, 5 4, 6 4, 6 3, 7 3, 7 4, 8 4, 8 3, 9 3, 
  561     9 4, 10 4, 10 3, 11 3, 11 2, 10 2, 10 1, 9 1, 9 2, 8 2, 
  562     8 1, 7 1, 7 2, 6 2, 6 1, 5 1, 5 2)))  </op>
  563 </test>
  564 <test>
  565   <op name="difference" arg1="A" arg2="B">
  566     MULTIPOLYGON(
  567       (
  568         (1 2, 1 4, 2 4, 2 2, 2 1, 1 1, 1 2)), 
  569       (
  570         (3 2, 3 4, 4 4, 4 2, 4 1, 3 1, 3 2)), 
  571       (
  572         (5 2, 5 4, 6 4, 6 3, 5 2)), 
  573       (
  574         (6 2, 6 1, 5 1, 5 2, 6 2)), 
  575       (
  576         (7 3, 7 4, 8 4, 8 3, 7 3)), 
  577       (
  578         (8 2, 8 1, 7 1, 7 2, 8 2)), 
  579       (
  580         (9 3, 9 4, 10 4, 10 3, 9 3)), 
  581       (
  582         (10 2, 10 1, 9 1, 9 2, 10 2)))
  583   </op>
  584 </test>
  585 <test>
  586   <op name="symdifference" arg1="A" arg2="B">
  587 GEOMETRYCOLLECTION(
  588   LINESTRING(0 2, 1 2), 
  589   LINESTRING(2 2, 3 2), 
  590   LINESTRING(4 2, 5 2), 
  591   POLYGON(
  592     (1 2, 1 4, 2 4, 2 2, 2 1, 1 1, 1 2)), 
  593   POLYGON(
  594     (3 2, 3 4, 4 4, 4 2, 4 1, 3 1, 3 2)), 
  595   POLYGON(
  596     (5 2, 5 4, 6 4, 6 3, 5 2)), 
  597   POLYGON(
  598     (6 2, 6 1, 5 1, 5 2, 6 2)), 
  599   POLYGON(
  600     (6 2, 6 3, 7 3, 7 2, 6 2)), 
  601   POLYGON(
  602     (7 3, 7 4, 8 4, 8 3, 7 3)), 
  603   POLYGON(
  604     (8 2, 8 1, 7 1, 7 2, 8 2)), 
  605   POLYGON(
  606     (8 2, 8 3, 9 3, 9 2, 8 2)), 
  607   POLYGON(
  608     (9 3, 9 4, 10 4, 10 3, 9 3)), 
  609   POLYGON(
  610     (10 2, 10 1, 9 1, 9 2, 10 2)), 
  611   POLYGON(
  612     (10 2, 10 3, 11 3, 11 2, 10 2)))
  613   </op>
  614 </test>
  615 </case>
  616 
  617 <case>
  618   <desc>AA - Polygon with hole with outward sliver, cut by polygon</desc>
  619   <a>
  620     POLYGON(
  621       (20 40, 20 200, 180 200, 180 40, 20 40), 
  622       (180 120, 120 120, 120 160, 60 120, 120 80, 120 119, 180 120))
  623   </a>
  624   <b>
  625     POLYGON(
  626       (200 160, 160 160, 160 80, 200 80, 200 160))
  627   </b>
  628 <test>
  629   <op name="convexhull" arg1="A">
  630     POLYGON(
  631       (20 40, 20 200, 180 200, 180 40, 20 40))
  632   </op>
  633 </test>
  634 <test>
  635   <op name="intersection" arg1="A" arg2="B">
  636     GEOMETRYCOLLECTION(
  637       LINESTRING(180 120, 160 120), 
  638       POLYGON(
  639         (180 160, 180 120, 180 80, 160 80, 160 120, 160 160, 180 160)))
  640   </op>
  641 </test>
  642 <test>
  643   <op name="union" arg1="A" arg2="B">
  644     POLYGON(
  645       (20 40, 20 200, 180 200, 180 160, 200 160, 200 80, 180 80, 180 40, 20 40), 
  646       (160 120, 120 120, 120 160, 60 120, 120 80, 120 119, 160 120))
  647   </op>
  648 </test>
  649 <test>
  650   <op name="difference" arg1="A" arg2="B">
  651     POLYGON(
  652       (20 40, 20 200, 180 200, 180 160, 160 160, 160 120, 160 80, 180 80, 180 40, 
  653       20 40), 
  654       (160 120, 120 120, 120 160, 60 120, 120 80, 120 119, 160 120))
  655   </op>
  656 </test>
  657 <test>
  658   <op name="symdifference" arg1="A" arg2="B">
  659     MULTIPOLYGON(
  660       (
  661         (20 40, 20 200, 180 200, 180 160, 160 160, 160 120, 160 80, 180 80, 180 40, 
  662         20 40), 
  663         (160 120, 120 120, 120 160, 60 120, 120 80, 120 119, 160 120)), 
  664       (
  665         (180 120, 180 160, 200 160, 200 80, 180 80, 180 120)))
  666   </op>
  667 </test>
  668 </case>
  669 
  670 <case>
  671   <desc>AA - Polygon with hole with outward sliver, cut by line</desc>
  672   <a>
  673     POLYGON(
  674       (20 40, 20 200, 180 200, 180 40, 20 40), 
  675       (180 120, 120 120, 120 160, 60 120, 120 80, 120 119, 180 120))
  676   </a>
  677   <b>
  678     LINESTRING(160 140, 160 100)
  679   </b>
  680 <test>
  681   <op name="convexhull" arg1="A">
  682     POLYGON(
  683       (20 40, 20 200, 180 200, 180 40, 20 40))
  684   </op>
  685 </test>
  686 <test>
  687   <op name="intersection" arg1="A" arg2="B">
  688     MULTILINESTRING(
  689       (160 140, 160 120), 
  690       (160 120, 160 100))
  691   </op>
  692 </test>
  693 <test>
  694   <op name="union" arg1="A" arg2="B">
  695     POLYGON(
  696       (20 40, 20 200, 180 200, 180 120, 180 40, 20 40), 
  697       (160 120, 120 120, 120 160, 60 120, 120 80, 120 119, 160 120))
  698   </op>
  699 </test>
  700 <test>
  701   <op name="difference" arg1="A" arg2="B">
  702     POLYGON(
  703       (20 40, 20 200, 180 200, 180 120, 180 40, 20 40), 
  704       (160 120, 120 120, 120 160, 60 120, 120 80, 120 119, 160 120))
  705   </op>
  706 </test>
  707 <test>
  708   <op name="symdifference" arg1="A" arg2="B">
  709     POLYGON(
  710       (20 40, 20 200, 180 200, 180 120, 180 40, 20 40), 
  711       (160 120, 120 120, 120 160, 60 120, 120 80, 120 119, 160 120))
  712   </op>
  713 </test>
  714 </case>
  715 
  716 <case>
  717   <desc>AA - Polygon with inward sliver touching hole, cut by polygon</desc>
  718   <a>
  719     POLYGON(
  720       (20 40, 20 200, 180 200, 180 120, 140 120, 180 119, 180 40, 20 40), 
  721       (140 160, 80 120, 140 80, 140 160))
  722   </a>
  723   <b>
  724     POLYGON(
  725       (200 160, 150 160, 150 80, 200 80, 200 160))
  726   </b>
  727 <test>
  728   <op name="convexhull" arg1="A">
  729     POLYGON(
  730       (20 40, 20 200, 180 200, 180 40, 20 40))
  731   </op>
  732 </test>
  733 <test>
  734   <op name="intersection" arg1="A" arg2="B">
  735     MULTIPOLYGON(
  736       (
  737         (180 160, 180 120, 150 120, 150 160, 180 160)), 
  738       (
  739         (150 120, 180 119, 180 80, 150 80, 150 120)))
  740   </op>
  741 </test>
  742 <test>
  743   <op name="union" arg1="A" arg2="B">
  744     POLYGON(
  745       (20 40, 20 200, 180 200, 180 160, 200 160, 200 80, 180 80, 180 40, 20 40), 
  746       (140 160, 80 120, 140 80, 140 120, 140 160))
  747   </op>
  748 </test>
  749 <test>
  750   <op name="difference" arg1="A" arg2="B">
  751     POLYGON(
  752       (20 40, 20 200, 180 200, 180 160, 150 160, 150 120, 150 80, 180 80, 180 40, 
  753       20 40), 
  754       (140 160, 80 120, 140 80, 140 120, 140 160))
  755   </op>
  756 </test>
  757 <test>
  758   <op name="symdifference" arg1="A" arg2="B">
  759     MULTIPOLYGON(
  760       (
  761         (20 40, 20 200, 180 200, 180 160, 150 160, 150 120, 150 80, 180 80, 180 40, 
  762         20 40), 
  763         (140 160, 80 120, 140 80, 140 120, 140 160)), 
  764       (
  765         (150 120, 180 120, 180 160, 200 160, 200 80, 180 80, 180 119, 150 120)))
  766   </op>
  767 </test>
  768 </case>
  769 
  770 <case>
  771   <desc>AA - intersecting slivers, dimensional collapse</desc>
  772   <a>
  773     POLYGON(
  774       (83 33, 62 402, 68 402, 83 33))
  775   </a>
  776   <b>
  777     POLYGON(
  778       (78 39, 574 76, 576 60, 78 39))
  779   </b>
  780 <test>
  781   <op name="getboundary" arg1="A">
  782     LINESTRING(83 33, 62 402, 68 402, 83 33)
  783   </op>
  784 </test>
  785 <test>
  786   <op name="convexhull" arg1="A">
  787     POLYGON(
  788       (83 33, 62 402, 68 402, 83 33))
  789   </op>
  790 </test>
  791 <test>
  792   <op name="intersection" arg1="A" arg2="B">
  793     POINT(83 39)
  794   </op>
  795 </test>
  796 <test>
  797   <op name="union" arg1="A" arg2="B">
  798     GEOMETRYCOLLECTION(
  799       LINESTRING(78 39, 83 39), 
  800       LINESTRING(83 33, 83 39), 
  801       POLYGON(
  802         (83 39, 62 402, 68 402, 83 39)), 
  803       POLYGON(
  804         (83 39, 574 76, 576 60, 83 39)))
  805   </op>
  806 </test>
  807 <test>
  808   <op name="difference" arg1="A" arg2="B">
  809     GEOMETRYCOLLECTION(
  810       LINESTRING(83 33, 83 39), 
  811       POLYGON(
  812         (83 39, 62 402, 68 402, 83 39)))
  813   </op>
  814 </test>
  815 <test>
  816   <op name="symdifference" arg1="A" arg2="B">
  817     GEOMETRYCOLLECTION(
  818       LINESTRING(78 39, 83 39), 
  819       LINESTRING(83 33, 83 39), 
  820       POLYGON(
  821         (83 39, 62 402, 68 402, 83 39)), 
  822       POLYGON(
  823         (83 39, 574 76, 576 60, 83 39)))
  824   </op>
  825 </test>
  826 </case>
  827 
  828 </run>