Skip to content

Commit

Permalink
Remove unneeded code from GeometryGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Jan 10, 2024
1 parent 1df5954 commit 39fa4a7
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,10 @@ private void add(Geometry g)
private void addCollection(GeometryCollection gc)
{
for (int i = 0; i < gc.getNumGeometries(); i++) {
Geometry g = gc.getGeometryN(i);
if (! g.isEmpty()) {
add(g);
}
add(gc.getGeometryN(i));
}
}

/**
* Add a Point to the graph.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
</case>

<case>
<desc>mPA - empty MultiPoint element</desc>
<desc>mPA - empty MultiPoint element for A</desc>
<a>
MULTIPOINT(EMPTY,(0 0))
</a>
Expand All @@ -181,6 +181,81 @@
<test><op name="within" arg1="A" arg2="B"> true </op></test>
</case>

<case>
<desc>mPA - empty MultiPoint element for A, on boundary of B</desc>
<a>
MULTIPOINT(EMPTY,(1 0))
</a>
<b>
POLYGON ((1 0,0 1,-1 0,0 -1, 1 0))
</b>
<test>
<op name="relate" arg3="F0FFFF212" arg1="A" arg2="B">
true
</op>
</test>
<test><op name="contains" arg1="A" arg2="B"> false </op></test>
<test><op name="coveredBy" arg1="A" arg2="B"> true </op></test>
<test><op name="covers" arg1="A" arg2="B"> false </op></test>
<test><op name="crosses" arg1="A" arg2="B"> false </op></test>
<test><op name="disjoint" arg1="A" arg2="B"> false </op></test>
<test><op name="equalsTopo" arg1="A" arg2="B"> false </op></test>
<test><op name="intersects" arg1="A" arg2="B"> true </op></test>
<test><op name="overlaps" arg1="A" arg2="B"> false </op></test>
<test><op name="touches" arg1="A" arg2="B"> true </op></test>
<test><op name="within" arg1="A" arg2="B"> false </op></test>
</case>

<case>
<desc>mPA - empty MultiPoint element for B</desc>
<a>
POLYGON ((1 0,0 1,-1 0,0 -1, 1 0))
</a>
<b>
MULTIPOINT(EMPTY,(0 0))
</b>
<test>
<op name="relate" arg3="0F2FF1FF2" arg1="A" arg2="B">
true
</op>
</test>
<test><op name="contains" arg1="A" arg2="B"> true </op></test>
<test><op name="coveredBy" arg1="A" arg2="B"> false </op></test>
<test><op name="covers" arg1="A" arg2="B"> true </op></test>
<test><op name="crosses" arg1="A" arg2="B"> false </op></test>
<test><op name="disjoint" arg1="A" arg2="B"> false </op></test>
<test><op name="equalsTopo" arg1="A" arg2="B"> false </op></test>
<test><op name="intersects" arg1="A" arg2="B"> true </op></test>
<test><op name="overlaps" arg1="A" arg2="B"> false </op></test>
<test><op name="touches" arg1="A" arg2="B"> false </op></test>
<test><op name="within" arg1="A" arg2="B"> false </op></test>
</case>

<case>
<desc>mPA - empty MultiPoint element for B, on boundary of A</desc>
<a>
POLYGON ((1 0,0 1,-1 0,0 -1, 1 0))
</a>
<b>
MULTIPOINT(EMPTY,(1 0))
</b>
<test>
<op name="relate" arg3="FF20F1FF2" arg1="A" arg2="B">
true
</op>
</test>
<test><op name="contains" arg1="A" arg2="B"> false </op></test>
<test><op name="coveredBy" arg1="A" arg2="B"> false </op></test>
<test><op name="covers" arg1="A" arg2="B"> true </op></test>
<test><op name="crosses" arg1="A" arg2="B"> false </op></test>
<test><op name="disjoint" arg1="A" arg2="B"> false </op></test>
<test><op name="equalsTopo" arg1="A" arg2="B"> false </op></test>
<test><op name="intersects" arg1="A" arg2="B"> true </op></test>
<test><op name="overlaps" arg1="A" arg2="B"> false </op></test>
<test><op name="touches" arg1="A" arg2="B"> true </op></test>
<test><op name="within" arg1="A" arg2="B"> false </op></test>
</case>

<case>
<desc>PmA - empty MultiPolygon element</desc>
<a>
Expand Down

0 comments on commit 39fa4a7

Please sign in to comment.