-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Comments
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. |
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 Even more baffling are cases where gaps are not detected at all: 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. |
This is "fun". Check a layer for gaps (and "modify input layer" active), finds 10 gaps choose to fix them with the default resolution 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: it finds again 10 erros... and the cycle continues.... |
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.
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.
(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
The text was updated successfully, but these errors were encountered: