Skip to content

Commit

Permalink
Add InteriorPoint tests with empty elements
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Nov 29, 2023
1 parent bb1a026 commit 09885ba
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions tests/xmltester/tests/general/TestInteriorPoint.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<run>
<precisionModel scale="1.0" offsetx="0.0" offsety="0.0"/>

<case>
<desc>P - empty</desc>
Expand All @@ -23,15 +22,22 @@
<case>
<desc>P - multipoint with EMPTY</desc>
<a> MULTIPOINT((0 0), EMPTY)
</a>
</a>
<test><op name="getInteriorPoint" arg1="A" > POINT (0 0) </op></test>
</case>

<case>
<desc>L - empty</desc>
<a> LINESTRING EMPTY
</a>
<test><op name="getInteriorPoint" arg1="A" > POINT EMPTY </op></test>
</case>

<case>
<desc>L - linestring with single segment</desc>
<a> LINESTRING (0 0, 7 14)
</a>
<test><op name="getInteriorPoint" arg1="A" > POINT (7 14) </op></test>
</a>
<test><op name="getInteriorPoint" arg1="A" > POINT (0 0) </op></test>
</case>

<case>
Expand Down Expand Up @@ -61,6 +67,13 @@
<test><op name="getInteriorPoint" arg1="A" > POINT (180 200) </op></test>
</case>

<case>
<desc>mL - multilinestring with empty</desc>
<a> MULTILINESTRING ((0 0, 1 1), EMPTY)
</a>
<test><op name="getInteriorPoint" arg1="A" > POINT (0 0) </op></test>
</case>

<case>
<desc>A - box</desc>
<a> POLYGON ((0 0, 0 10, 10 10, 10 0, 0 0))
Expand All @@ -86,7 +99,7 @@
<desc>A - polygon with horizontal segment at centre (narrower L shape)</desc>
<a> POLYGON ((0 2, 0 4, 3 4, 3 0, 2 0, 2 2, 0 2))
</a>
<test><op name="getInteriorPoint" arg1="A" > POINT (2 3) </op></test>
<test><op name="getInteriorPoint" arg1="A" > POINT (1.5 3) </op></test>
</case>

<case>
Expand All @@ -96,6 +109,14 @@
<test><op name="getInteriorPoint" arg1="A" > POINT (115 200) </op></test>
</case>


<case>
<desc>mA - multipolygon with empty</desc>
<a> MULTIPOLYGON (((0 2, 0 4, 3 4, 3 0, 2 0, 2 2, 0 2)), EMPTY)
</a>
<test><op name="getInteriorPoint" arg1="A" > POINT (1.5 3) </op></test>
</case>

<case>
<desc>GC - collection of polygons, lines, points</desc>
<a> GEOMETRYCOLLECTION (POLYGON ((0 40, 40 40, 40 0, 0 0, 0 40)),
Expand Down Expand Up @@ -126,10 +147,8 @@
<a> GEOMETRYCOLLECTION (POLYGON ((10 10, 10 10, 10 10, 10 10)),
LINESTRING (20 20, 20 20),
MULTIPOINT ((20 10), (10 20)) )
</a>
</a>
<test><op name="getInteriorPoint" arg1="A" > POINT (10 10) </op></test>
</case>



</run>

0 comments on commit 09885ba

Please sign in to comment.