-
-
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
Crash using Geometry Checker plugin #21577
Comments
Author Name: Salvatore Larosa (@slarosa) Sandro Mani seems not to be into the "assigned to" list. How can I notify this to him? |
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Giovanni Manghi (@gioman) These days I can only test master on Windows and I confirm the crash when trying to fix a simple polygon with 1 self-intersection when choosing "split feature into multi object feature". On the other end if choosing "split feature in multiple single-object features" do no causes crash, but one of the two (supposedly) output polygons is lost. |
Author Name: Giovanni Manghi (@gioman) Salvatore Larosa wrote:
I have added to the list... but then it depends if he configured his account to receive notifications from tickets, so maybe is better to notify him directly too. |
Author Name: Sandro Mani (Sandro Mani) I got the notifications. Thanks for reporting the issues, I'll look into them. |
Author Name: Sandro Mani (Sandro Mani) @giovanni Manghi: I see a crash when I zoom on the canvas after the self-intersection fix is complete (i.e. when fix summary dialog is shown). This appears to be caused by corruption in the wkb string of the geometry, even though it looks correct as it is returned by QgsGeometryCollectionV2::asWkb - the corruption appears to happen later on in QgsMapToPixelSimplifier::simplifyWkbGeometry. Can you confirm that this is the same issue you are seeing? Salvatore Larosa: Could you please specify which checks are active when you trigger the crash? |
Author Name: Sandro Mani (Sandro Mani) So the actual cause of the post-self-intersection fix crash I described above is that QgsMapToPixelSimplifier does not handle curved geometries correctly. Curved geometries arose because the self-intersection fix created new parts as CurvePolygons. I've changed this [1] and now if the original feature was a linear polygon, then the new part will also be one. This prevents the crash from happening when fixing linear polygons, but the issue with QgsMapToPixelSimplifier remains. |
Author Name: Salvatore Larosa (@slarosa) Sandro Mani wrote:
Geometry validity: Topology checks: |
Author Name: Giovanni Manghi (@gioman) Sandro Mani wrote:
Screencast and sample data attached. Cheers!
|
Author Name: Sandro Mani (Sandro Mani) Could you please re-test against the latest master? It contains some Geometry Checker fixes as well as changes at QgsGeos level. |
Author Name: Nyall Dawson (@nyalldawson)
|
Author Name: Salvatore Larosa (@slarosa) Works fine for me in current master. I leave the ticket opened for more feedback from Giovanni. |
Author Name: Giovanni Manghi (@gioman) Also fine here. Thanks!
|
Author Name: Giovanni Manghi (@gioman)
|
Author Name: Reinhard Reiterer (Reinhard Reiterer) On Windows 7 the 'Check Geometries' plugin may cause a crash when 'Topology checks' are activated. I've tested the .shp file uploaded by Salvatore Larosa and 'Check for duplicates' isn't working (see attachment). On Ubuntu 14.04 there is no crash but QGIS says 'Check error occurred' in a separate dialogue window. QGIS 2.12.3
|
Author Name: Sandro Mani (Sandro Mani) The crash under windows needs to be investigated. The dialog shown about check errors is expected: The layer contains issues which are preventing the duplicate check from working (specifically, because the geometry engine, GEOS, won't handle geometries with self intersections, and GEOS is being used to check for topology issues). So you'll need to fix those errors first, and then do the topology checks once those errors are fixed. |
Author Name: Jürgen Fischer (@jef-n) Reinhard Reiterer wrote:
Doesn't crash here on windows with master. |
Author Name: Reinhard Reiterer (Reinhard Reiterer) I did some testing and the "Geometry checker" often crashes when dealing with complex features. Seems it's a cross-platform issue. I've uploaded the stacktrace of a Ubuntu crash report.
|
Author Name: Sandro Mani (Sandro Mani) If possible, please provide a dataset with which to reproduce and specify how you set up the geometry checker. |
Author Name: Reinhard Reiterer (Reinhard Reiterer) Hope this helps. @ #16
|
Author Name: Sandro Mani (Sandro Mani) Thanks, can reproduce, will analyze. |
Author Name: Sandro Mani (Sandro Mani) Fix here: #2868 |
Author Name: Reinhard Reiterer (Reinhard Reiterer) The fix seems to work. Unfortunately the 'Check geometries' plugin is still facing issues. I've uploaded the .shp files.
|
Author Name: Sandro Mani (Sandro Mani) |
Author Name: Nyall Dawson (@nyalldawson) PR merged, should be fixed in master and 2.14 now.
|
Author Name: Reinhard Reiterer (Reinhard Reiterer) Is the fix #12965 already implemented? QGIS (1:2.14.0+git20160315+342a754+20trusty) is still crashing. |
Author Name: Reinhard Reiterer (Reinhard Reiterer) I've tested the 'Check Geometries' plugin on several layers and everything seems to work now :) |
Author Name: Reinhard Reiterer (Reinhard Reiterer) Hi Sandro, I've noticed another bug. When trying to fix the selected errors QGIS crashes again (see attachment).
|
Author Name: Sandro Mani (Sandro Mani) Wow, that was a nasty bug. Could you try the branch https://github.com/manisandro/QGIS/tree/geom_checker_fixes (last two commits are the relevant ones)? Thanks |
Author Name: Sandro Mani (Sandro Mani) Oh and you'll need to reduce the precision to 1E-6 for the test case you attached. Reason are GEOS precision issues. |
Author Name: Reinhard Reiterer (Reinhard Reiterer) Is there any way to implement the fix in the next master? I don't know how to install a branch. |
Author Name: Sandro Mani (Sandro Mani) Now merged in master |
Author Name: Reinhard Reiterer (Reinhard Reiterer) Thanks for your help, the 'Geometry Checker' is no longer crashing. However, fixing minimum area issues may be quite tricky if there are no neighboring polygons to merge with.
|
Author Name: Reinhard Reiterer (Reinhard Reiterer) Is there anything I can do when the gap check reports a topology exception (see gap_check_topology_exception.png)? Is this a bug?
|
Author Name: Sandro Mani (Sandro Mani) It is unlikely a bug (in the QGIS code at least). Can you spot a faulty geometry at the position indicated? |
Author Name: Reinhard Reiterer (Reinhard Reiterer) The layer includes many sliver polygons, that the geometry checker can't fix. Maybe I'm doing something wrong?
|
Author Name: Sandro Mani (Sandro Mani) Please open a separate issue and attach the problematic data. |
Author Name: Reinhard Reiterer (Reinhard Reiterer) I can not attach the data as the shape files are proprietary :/ |
Author Name: Salvatore Larosa (@slarosa)
Original Redmine Issue: 13535
Affected QGIS version: master
Redmine category:c++_plugins/geometry_checker
Assignee: Sandro Mani
Performing a check on a Polygon layer (attached) I am getting the following stacktrace:
The text was updated successfully, but these errors were encountered: