-
Notifications
You must be signed in to change notification settings - Fork 64
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
fix: hide topology errors in line hit detection & optimizations #261
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@megawac thx for the PRs and sorry for the late answer. I review all of them and try to be responsive in the next month. |
try { | ||
intersections = OverlayOp.intersection(parsedLineA, parsedLineB); | ||
} catch (e) { | ||
return; // The OverlayOp will sometimes error with topology errors for certain lines |
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.
@megawac Have you some more precise info about those topology error ? Could be nice to have an example.
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 seem to recall them occurring quite often when #267 was occurring... I'll see if I can track down if there was more context on internal tickets.
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.
This is from the original ticket reported on our side. So in the case the case of the error, parsedLineB
snap line appears to be invalid from the error below. There is a video of the error occurring but I'd have to get clearance to share I believe
Uncaught TopologyException: found non-noded intersection between LINESTRING ( 9.952973188580247 2.35845900632583, 11.739231890263671 2.3680559374052663 ) and LINESTRING ( 9.952973188580248 2.35845900632583, 11.452360499376073 508.73944164968873 ) [ (9.952973188580248, 2.35845900632583, NaN) ]
at g.checkValid (bundle.js)
at E.checkValid (bundle.js)
at E.checkValid (bundle.js)
at A.computeOverlay (bundle.js)
at A.getResultGeometry (bundle.js)
at A.overlayOp (bundle.js)
at E.getResultGeometry (bundle.js)
at E.overlayOp (bundle.js)
at A.intersection (bundle.js)
at bundle.js
at Array.forEach (<anonymous>)
at bundle.js
at Array.forEach (<anonymous>)
at J (bundle.js)
at ee.drawSnapLines (bundle.js)
at ee.onMove (bundle.js)
at a.handleEvent (bundle.js)
at le.handleMapBrowserEvent (bundle.js)
at u.dispatchEvent (bundle.js)
at u.relayMoveEvent_ (bundle.js)
at HTMLDivElement.d (bundle.js)
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've added a file for a unit test. Can you add one tests for the topolgy error?
@megawac can you fix the conflict? I will merge this even without test because it's usefull. |
* github/master: (35 commits) chore: at least make sure the demo can draw a point chore: fix use of custom layer chore: fix demo chore: fix changelog chore(release): 2.4.2 chore(release): 2.4.2-beta.1 fix: listen only when possible chore(release): 2.4.2-beta.0 fix: unlisten only when possible chore(release): 2.4.1 fix: fix editor.remove and add a test chore: updates peer depedencies chore: updates readme chore: updates readme chore(release): 2.4.0 feat: add extentFilter property in CAD control test: add test for editor chore: we are not responsible of bad input of the user chore: we are not responsible of bad input of the user feat: add editor#removeControl (geops#266) ...
Done, the linting error appears to be an issue with a ci token |
This fixes an issue where jsts may throw
TopologyError
errors when building the intersections due to the snappable lines built having invalid geometry. We also do some minor performance work byisSameLine
check prior to theIntersectionOp
for some minor performance in the case we can avoid the work.Others