Skip to content
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 (literal) edge cases in fast-polygon operations class #204

Merged
merged 7 commits into from
Dec 18, 2019

Conversation

tyrasd
Copy link
Member

@tyrasd tyrasd commented Dec 17, 2019

Literal edge case here πŸ˜† – Sometimes during the preprocessing step (responsible for optimizing the polygon operations) the intermediate results may contain superfluous points or lines along the clipping edge(s). These additional geometries cause problems further down the processing pipeline. Since these edge artifacts don't contribute anything to the final oshdb query result, they can just be filtered out.

Here is an example of a geometry which can cause such a situation: https://gist.github.com/tyrasd/19ec9399d42dcf76ed7ab16432052afe (found by @redfrexx ~ thanks!).

Checklist

@tyrasd tyrasd added the bug Something isn't working as expected label Dec 17, 2019
Copy link
Member

@rtroilo rtroilo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the gcPolys list could hold also only a single polygon?
If it makes a difference to handle a Mulitpolygon instead of a Polygon in the following code than it would make sense to do here an additional check.

@tyrasd
Copy link
Member Author

tyrasd commented Dec 18, 2019

the gcPolys list could hold also only a single polygon?

it can. good point. I'll add a path for the single polygon case.

compares results against what Polygon.intersection would return
I couldn't find any example where this would be triggered, but I can't think of why it can't happen neither. So, a method to reduce it back down to a regular multipolygon is theoretically needed
@tyrasd tyrasd merged commit 58eefc7 into master Dec 18, 2019
@tyrasd tyrasd deleted the fix-fip-edgecases branch December 18, 2019 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants