jsts/testxml/general/TestFunctionPA.xml
2016-02-05 07:59:16 +01:00

156 lines
3.9 KiB
XML

<run>
<precisionModel scale="1.0" offsetx="0.0" offsety="0.0"/>
<case>
<desc>PA - point contained in simple polygon</desc>
<a>
POINT(100 100)
</a>
<b>
POLYGON(
(50 50, 200 50, 200 200, 50 200, 50 50))
</b>
<test>
<op name="intersection" arg1="A" arg2="B">
POINT(100 100)
</op>
</test>
</case>
<case>
<desc>mPmA - points on I, B and E of touching triangles</desc>
<a>
MULTIPOLYGON(
(
(120 320, 180 200, 240 320, 120 320)),
(
(180 200, 240 80, 300 200, 180 200)))
</a>
<b>
MULTIPOINT((120 320), (180 260), (180 320), (180 200), (300 200), (200 220))
</b>
<test>
<op name="getboundary" arg1="A">
MULTILINESTRING(
(120 320, 180 200, 240 320, 120 320),
(180 200, 240 80, 300 200, 180 200))
</op>
</test>
<test>
<op name="convexhull" arg1="A">
POLYGON(
(240 80, 120 320, 240 320, 300 200, 240 80))
</op>
</test>
<test>
<op name="intersection" arg1="A" arg2="B">
MULTIPOINT((120 320), (180 200), (180 260), (180 320), (300 200))
</op>
</test>
<test>
<op name="union" arg1="A" arg2="B">
GEOMETRYCOLLECTION(
POINT(200 220),
POLYGON(
(180 200, 120 320, 240 320, 180 200)),
POLYGON(
(180 200, 300 200, 240 80, 180 200)))
</op>
</test>
<test>
<op name="difference" arg1="A" arg2="B">
MULTIPOLYGON(
(
(180 200, 120 320, 240 320, 180 200)),
(
(180 200, 300 200, 240 80, 180 200)))
</op>
</test>
<test>
<op name="symdifference" arg1="A" arg2="B">
GEOMETRYCOLLECTION(
POINT(200 220),
POLYGON(
(180 200, 120 320, 240 320, 180 200)),
POLYGON(
(180 200, 300 200, 240 80, 180 200)))
</op>
</test>
</case>
<case>
<desc>mPmA - points on I, B and E of concentric doughnuts</desc>
<a>
MULTIPOLYGON(
(
(120 80, 420 80, 420 340, 120 340, 120 80),
(160 300, 160 120, 380 120, 380 300, 160 300)),
(
(200 260, 200 160, 340 160, 340 260, 200 260),
(240 220, 240 200, 300 200, 300 220, 240 220)))
</a>
<b>
MULTIPOINT((200 360), (420 340), (400 100), (340 120), (200 140), (200 160), (220 180), (260 200), (200 360),
(420 340), (400 100), (340 120), (200 140), (200 160), (220 180), (260 200))
</b>
<test>
<op name="getboundary" arg1="A">
MULTILINESTRING(
(120 80, 420 80, 420 340, 120 340, 120 80),
(160 300, 160 120, 380 120, 380 300, 160 300),
(200 260, 200 160, 340 160, 340 260, 200 260),
(240 220, 240 200, 300 200, 300 220, 240 220))
</op>
</test>
<test>
<op name="convexhull" arg1="A">
POLYGON(
(120 80, 120 340, 420 340, 420 80, 120 80))
</op>
</test>
<test>
<op name="intersection" arg1="A" arg2="B">
MULTIPOINT((200 160), (220 180), (260 200), (340 120), (400 100), (420 340))
</op>
</test>
<test>
<op name="union" arg1="A" arg2="B">
GEOMETRYCOLLECTION(
POINT(200 140),
POINT(200 360),
POLYGON(
(120 80, 120 340, 420 340, 420 80, 120 80),
(160 300, 160 120, 380 120, 380 300, 160 300)),
POLYGON(
(200 260, 340 260, 340 160, 200 160, 200 260),
(240 220, 240 200, 300 200, 300 220, 240 220)))
</op>
</test>
<test>
<op name="difference" arg1="A" arg2="B">
MULTIPOLYGON(
(
(120 80, 120 340, 420 340, 420 80, 120 80),
(160 300, 160 120, 380 120, 380 300, 160 300)),
(
(200 260, 340 260, 340 160, 200 160, 200 260),
(240 220, 240 200, 300 200, 300 220, 240 220)))
</op>
</test>
<test>
<op name="symdifference" arg1="A" arg2="B">
GEOMETRYCOLLECTION(
POINT(200 140),
POINT(200 360),
POLYGON(
(120 80, 120 340, 420 340, 420 80, 120 80),
(160 300, 160 120, 380 120, 380 300, 160 300)),
POLYGON(
(200 260, 340 260, 340 160, 200 160, 200 260),
(240 220, 240 200, 300 200, 300 220, 240 220)))
</op>
</test>
</case>
</run>