-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Try to simplify geometries that fail with TopologyException #115834
Conversation
Pinging @elastic/es-analytical-engine (Team:Analytics) |
Hi @iverase, I've created a changelog YAML for you. |
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.
Since we deal with envelope disjoint and contains separately, this seems like a safe enough approach as it should mostly be geometries that are likely intersecting. I guess the worst case scenario is a big geometry that intersects the window with a small corner, and simplifying just that corner would be best, and now we'll simplify the whole geometry. Still better than throwing the exception.
…115834) This geometries are valid and they can actually be simplified so lets make the clipping algorithm a best effort and return the original geometry in those cases so the simplification can handle it.
…115834) This geometries are valid and they can actually be simplified so lets make the clipping algorithm a best effort and return the original geometry in those cases so the simplification can handle it.
…115834) This geometries are valid and they can actually be simplified so lets make the clipping algorithm a best effort and return the original geometry in those cases so the simplification can handle it.
…#115842) This geometries are valid and they can actually be simplified so lets make the clipping algorithm a best effort and return the original geometry in those cases so the simplification can handle it. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…115834) This geometries are valid and they can actually be simplified so lets make the clipping algorithm a best effort and return the original geometry in those cases so the simplification can handle it.
During some testing I noticed that some geometries where failing with a topolygy exception when computing the intersection. This error is not seeing when reading from source because we are swallowing the exceptions but it is visible when doing it from the stored value.
This geometries are valid and they can actually be simplified so lets make the clipping algorithm a best effort and return the original geometry in those cases so the simplification can handle it.
Note: I am working on adding a test but we need to clear the license of the geometry I am using and that might take time.