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

Add CascadedPolygonUnion bufferUnion #470

Merged
merged 2 commits into from
Sep 5, 2019

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Sep 5, 2019

Improves CascadedPolygonUnion by using a buffer(0) union if overlay union fails due to a topology error.

Signed-off-by: Martin Davis mtnclimb@gmail.com

Signed-off-by: Martin Davis <mtnclimb@gmail.com>
Signed-off-by: Martin Davis <mtnclimb@gmail.com>
@dbaston
Copy link
Contributor

dbaston commented Sep 5, 2019

Is there a test case that throws an exception with cascaded union but goes on to succeed with the buffer union?

@dr-jts dr-jts merged commit caa7722 into locationtech:master Sep 5, 2019
@dr-jts dr-jts deleted the add-cascadedunion-buffer branch September 5, 2019 16:45
@dr-jts
Copy link
Contributor Author

dr-jts commented Sep 5, 2019

Is there a test case that throws an exception with cascaded union but goes on to succeed with the buffer union?

good point, I was thinking about this too. There's definitely quite a few large datasets which fail without this and pass with it. The trick is extracting a simple test case. I will work on this. It will be useful for GEOS too.

In fact my hypothesis is that most union failures will actually work with buffer(0), so any of them would provide a test case.

@dr-jts
Copy link
Contributor Author

dr-jts commented Sep 5, 2019

I am adding a test case for this in #471.

No guarantee it has the same failing behaviour in GEOS, unfortunately. But hopefully it does.

strk pushed a commit to libgeos/geos that referenced this pull request Sep 16, 2019
New approach to overlap handling, to deal with robustness issues while preserving more performance than the old GEOS fix.
Add in fallback to buffer(0) when unary union fails, for more fault tolerance on hard cases.
Apply some const correctness features when building geometries from vector<const *Geometry>, as many constructors must do (from @dbaston)

locationtech/jts#470
locationtech/jts#429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants