Fix duplicate self-check triples in all modes if more than 2 objects are reference-collapsed - #25
Conversation
|
Fixed now two problems: 1.) A geometry G may have "references", that is, other objects that have the exact same geometry as G which are then not stored explicitly. If some pair 2.) For symmetric relations, we always write both sides (A equals B and B equals A). When we do self checks (checks of a referenced geometry A against "itself" to capture relations between A and its references), the expansion described in (1) would e.g. produce the pairs (A, B) and (B, A). But for symmetric relations like equals, these pairs are equivalent and we would then write Note that (2) was already done previously, but only at the lowest recursion level (where "is self check" can be trivially evaluated by checking whether A and B are the same ID). This is why self-check duplicates only materialized when more than 2 geometries were equivalent. |
|
Note that this still not fully eliminates duplicates from the output. For multigeometries, there is no internal bookkeeping for some relations of which triple was already produced, so if for a multigeometry Note that the "old" predicates are largely produced now by the DE9IM computation, so we should drop the remaining legacy code and bookkeeping for the old predicates. This would also further simplify the code. This will be another PR however. |
Will fix the "NOTE" in #24