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

Check geometries cannot be used to fix overlaps and gaps #34664

Open
uclaros opened this issue Feb 25, 2020 · 4 comments
Open

Check geometries cannot be used to fix overlaps and gaps #34664

uclaros opened this issue Feb 25, 2020 · 4 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Geometry checker

Comments

@uclaros
Copy link
Contributor

uclaros commented Feb 25, 2020

Describe the bug
The Check Geometries c++ plugin cannot be used to fix overlaps and gaps.
When fixing overlaps, I get a Error is obsolete, but rerunning the check shows that it is still there.
overlap

When fixing gaps, selecting the Create new feature resolution leads to a Fixed failed: Could not add feature.
Selecting one of the two Add to ... resolutions fills the gap but the tool thinks more gaps were created! Fixing those will create overlaps. Ignoring those and rerunning the check shows that they were fixed.
gap
(the error that pops on the background is irrelevant, Qt : QXcbConnection: XCB error: 3 (BadWindow), sequence: 15348, resource id: 35770697, major code: 40 (TranslateCoords), minor code: 0, but I do get a CRITICAL Layer check_geom : Field 0 of feature 500 doesn't exist. on the Messages Log)

How to Reproduce
-Run Check Geometries with Check for overlaps and Check for gaps with some big area value on the attached layer.
-Click fix on the errors
check_geom.gpkg.zip

QGIS and OS versions
Master on Debian

Additional context
I had similar experiences with gaps using the Topology Checker and the Layer properties>Digitizing>Topology Checks>Gaps option.
Could be the same as #23187 and #23188 from QGIS 2?
Could also be the same as #29556

@uclaros uclaros added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Feb 25, 2020
@gioman
Copy link
Contributor

gioman commented Feb 26, 2020

@uclaros it seems similar to #23187

@manisandro

@gioman gioman added the Plugins label Feb 26, 2020
@uclaros
Copy link
Contributor Author

uclaros commented Mar 18, 2020

In the case of new gaps found after fixing an error, the reason is flawed logic in the recheck mechanism. When an error is fixed, an mbr of the affected area is calculated and all features intersecting it are rechecked. If you have features with inner rings (holes) that intersect the mbr but their inner rings don't, then they are identified as gaps because other features that cover the holes do not take part in the recheck.

@gioman gioman changed the title Check geometries fix errors bugs Check geometries cannot be used to fix overlaps and gaps Nov 8, 2023
@gioman
Copy link
Contributor

gioman commented Nov 8, 2023

After 3.5 years I can pretty much still confirm this report, especially for gaps that rarely are fixed rendering the whole experience very frustrating especially considering that the processing "snap to..." tools can fix this problems but there is no (as far as I know) tool there that can check for those errors showing them on map (and Topology checker does not fix errors).

Back to geometry checker and gaps, choosing to fix the problem with "add to longest shared edge" or "add to largest neighboring area" returns most of the times a "failed to merge with neighbor" error, without saying why (and nothing in QGIS logs).

Choosing "create new feature" (creating tiny polygons that could be removed with other tools in a second step) always fails in "could not add feature".

And even when some gap is fixed the resulting report is very confusing

image

Even more baffling are cases where gaps are not detected at all:

image

Since long ago I'm a supporter (and available to co-fund the effort) of the idea of merging the geometry checker and topology checker: both names are confusing as both do geometry and topology checks, and while the topology checker is much more user friendly it does not fix anything. But as can see here the geometry checker has quite a few shortcomings of its own.

@gioman
Copy link
Contributor

gioman commented Nov 8, 2023

This is "fun". Check a layer for gaps (and "modify input layer" active), finds 10 gaps

image

choose to fix them with the default resolution

image

5 fixed, 2 not fixed, 6 new.... should give 13, but it says that are 12 (and by the way, what obsolete errors are?).

So run it again, same identical parameters:

image

it finds again 10 erros... and the cycle continues....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Geometry checker
Projects
None yet
Development

No branches or pull requests

2 participants