Skip to content

Fix duplicate and contradictory DE-9IM results for byte-identical geometries - #24

Merged
hannahbast merged 4 commits into
masterfrom
fix-two-within-distance-bugs
Aug 17, 2026
Merged

Fix duplicate and contradictory DE-9IM results for byte-identical geometries#24
hannahbast merged 4 commits into
masterfrom
fix-two-within-distance-bugs

Conversation

@patrickbr

@patrickbr patrickbr commented Aug 16, 2026

Copy link
Copy Markdown
Member

Byte-identical geometries with at least 500 points were reported twice under --de9im. For linestrings the two reports could even contradict each other, because the hardcoded matrix for equivalent linestrings was wrong (it is now 1FFF0FFF2). Also fix a rare issue in the duplicate removal, where line and polygon ids from independent counters shared one bookkeeping set. Fixes #23.

On the side, update util to include the fixes for ad-freiburg/util#12 and ad-freiburg/util#13, and add regression tests for those as well.

NOTE: With three or more byte-identical copies of the same geometry, the pairs between the copies are still reported twice. This also affects the classic relations and predates this change.

…or equivalent linestrings, fix a rare issue in which references were not found, add a few regression tests, update util
Escape the decimal dot in the six new test patterns and write both tab
separators as `\\t`. Use standard WKT for the linestrings `lsa` and
`lsb` in the `issue-23` dataset, which had doubled parentheses. Also
remove a stray semicolon next to a line already touched on this branch.
@hannahbast hannahbast changed the title No duplicate DE9IM self check writes, correct DE9IM string for equal lines Fix duplicate and contradictory DE9IM results for byte-identical geometries Aug 17, 2026
@hannahbast hannahbast changed the title Fix duplicate and contradictory DE9IM results for byte-identical geometries Fix duplicate and contradictory DE-9IM results for byte-identical geometries Aug 17, 2026
@hannahbast
hannahbast merged commit e7f5fda into master Aug 17, 2026
4 checks passed
@patrickbr

Copy link
Copy Markdown
Member Author

NOTE: With three or more byte-identical copies of the same geometry, the pairs between the copies are still reported twice. This also affects the classic relations and predates this change.

Work on this will continue in #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The new --de9im reports duplicate or even contradictory relations for identical geometries with ≥ 500 points

2 participants