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

Geometry fixer fixes #39392

Merged
merged 5 commits into from
Nov 8, 2020
Merged

Geometry fixer fixes #39392

merged 5 commits into from
Nov 8, 2020

Conversation

olivierdalang
Copy link
Contributor

@olivierdalang olivierdalang commented Oct 15, 2020

Description

This PR adds some fixes in the topology fixer logic (that is hidden by default, but used in the plugins) :

  • fixes an issue where trying to fix gaps would have no effect (happened when the gap was defined by a non-shared vertex on the edge or inside a neighbouring polygon)
  • fixed an issue where trying to fix overlaps would have no effect (happened because the tolerance used when first finding the overlap wasn't the same than when fixing the overlap, so that the initial overlap polygon wouldn't be found when fixing it)
  • fixed an issue where all points of a geometry would be "snapped to grid" when fixing an overlap, even points far away from the overlap (happened because the tolerance set to detect the overlaps was also used to modify the geometry)

There's many more issues (just look at the tracker :-) ) including in the provided overlap fixer test, where a sliver is left after fixing the overlap.
It's not easy to fix if we want to keep the ability to fix each part of an overlap independently (as an overlap part has shared edges with the base geom). But I'm not really sure of the current state of the geometry/topology checker plugin VS core feature, so I suggest to treat that separately (in what we shall call a geometry fixer fixes fix PR :-) )

The case where the gap was containing a point that was
lying inside (or on the edge) of a neighbouring polygon
used to fail, as we were using that neighbour's points
to  snap to (since it was also at distance 0).
This was leading to flaky wrong results.
We were not using the same tolerance when collecting
the error than when fixing the error.
@github-actions github-actions bot added this to the 3.16.0 milestone Oct 15, 2020
@nyalldawson
Copy link
Collaborator

Looks good to me!

@m-kuhn I'd appreciate your review here too, you know this code better than I do...

@nyalldawson nyalldawson modified the milestones: 3.16.0, 3.18 (Feature) Oct 23, 2020
@stale
Copy link

stale bot commented Nov 7, 2020

The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check

  • that all unit tests are passing

  • that all comments by reviewers have been addressed

  • that there is enough information for reviewers, in particular

    • link to any issues which this pull request fixes

    • add a description of workflows which this pull request fixes

    • add screenshots if applicable

  • that you have written unit tests where possible
    In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this pull request.
    If there is no further activity on this pull request, it will be closed in a week.

@stale stale bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Nov 7, 2020
@stale stale bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Nov 8, 2020
@m-kuhn m-kuhn merged commit 63d875b into qgis:master Nov 8, 2020
@olivierdalang olivierdalang deleted the geometry_fixer_fixes branch May 5, 2021 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants