-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement topological equality check for IntersectionMatrix #1133
Conversation
@michaelkirk There are some cases that will be useful for this in the |
All the files in textxml/general are parsed and processed. We only skip the operations we don't know how to support which may live across files or be a subset of a particular file. This seemed like the best way to get as much test coverage as possible. I hope you don't mind, but I pushed a commit to your branch that prints a little bit more about the stats of how many test cases are being skipped and why in jts_test_runner. You can see a lot more detail (too much detail probably) if you run with Feel free to remove it if you don't want to include it in your branch. |
Just to be clear - the tests in TestRelateLC and TestRelateLL are already being run. You can convince yourself by watching the tests fail after you tweak the expected output. |
Ahhh OK. Thank you! I'll have a further poke around. |
re: the CI failure, I'll open a PR soon that bumps our MSRV to 1.70 (>6 months old) and updates the "latest" containers. |
self.0[CoordPos::Inside][CoordPos::Inside] != Dimensions::Empty | ||
&& self.0[CoordPos::Inside][CoordPos::Outside] == Dimensions::Empty | ||
&& self.0[CoordPos::Outside][CoordPos::Inside] == Dimensions::Empty | ||
&& self.0[CoordPos::Outside][CoordPos::OnBoundary] == Dimensions::Empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need one more condition:
&& self.0[CoordPos::OnBoundary][CoordPos::Outside] == Dimensions::Empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn, thought I had them all. I looked at the other is_ methods for inspiration, but evidently got a bit confused. Which matrix entry does it correspond to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH, I firstly just intuited that any checks for an "is equal" relationship should be symmetrical - and noticed they weren't.
Then I noticed there are 5 constraints in the de-9im spec string, but you only had 4 comparisons and deduced which non-symmetrical check was missing.
But to try to answer your question directly, I think it's like this:
Spec for "is topo equal": [T*F**FFF*]
Inside_a | OnBoundary_a | Outside_a | |
---|---|---|---|
Inside_b | T | * | F |
OnBounary_b | * | * | F (missing) |
Outside_b | F | F | * |
Corresponding Indexes into de-9im string
Inside_a | OnBoundary_a | Outside_a | |
---|---|---|---|
Inside_b | 0 | 1 | 2 |
OnBounary_b | 3 | 4 | 5 (missing) |
Outside_b | 6 | 7 | 8 |
So we were missing a check for the 6th element (which has an index of 5).
[T*F**FFF*]
[ ^ ]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thank you!
CHANGES.md
if knowledge of this change could be valuable to users.Fixes #1132