Skip to content

Commit

Permalink
Fix equalsTopo predicate for empty
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Oct 11, 2024
1 parent 2b2baf1 commit dbc537d
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,20 @@ public static TopologyPredicate equalsTopo() {
@Override
public void init(int dimA, int dimB) {
super.init(dimA, dimB);
require(dimA == dimB);
//-- don't require equal dims, because EMPTY = EMPTY for all dims
}

@Override
public boolean requireInteraction() {
//-- allow EMPTY = EMPTY
return false;
};

@Override
public void init(Envelope envA, Envelope envB) {
//-- handle EMPTY = EMPTY cases
setValueIf(true, envA.isNull() && envB.isNull());

require(envA.equals(envB));
}

Expand Down

0 comments on commit dbc537d

Please sign in to comment.