Skip to content

Commit

Permalink
Change EMPTY EMPTY equals to true
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Oct 11, 2024
1 parent 7ff3367 commit f76e9bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,6 @@ public boolean evaluate(Geometry b, TopologyPredicate predicate) {

RelateGeometry geomB = new RelateGeometry(b, boundaryNodeRule);

if (geomA.isEmpty() && geomB.isEmpty()) {
//TODO: what if predicate is disjoint? Perhaps use result on disjoint envs?
return finishValue(predicate);
}
int dimA = geomA.getDimensionReal();
int dimB = geomB.getDimensionReal();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ public void testRepeatedPointAA() {
checkRelate(a, b, "212F01FF2");
}

//================ Repeated Points ==============
//================ EMPTY geometries ==============

public void testEmptyEquals() {
String empties[] = {
Expand All @@ -615,8 +615,8 @@ public void testEmptyEquals() {
String a = empties[i];
String b = empties[j];
checkRelate(a, b, "FFFFFFFF2");
//-- currently in JTS empty geometries do NOT test equal
checkEquals(a, b, false);
///-- empty geometries are all topologically equal
checkEquals(a, b, true);
}
}
}
Expand Down

0 comments on commit f76e9bf

Please sign in to comment.