Bug report #14447
Unknown exception when tracing is enabled
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Martin Dobias | ||
Category: | Digitising | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 22425 |
Description
When digitising complex features using the new tracing tool an expception window ('unknown exception') opens. The issue occurs when moving the mouse inside the canvas.
Associated revisions
Gracefully handle topology errors when tracing (fixes #14447)
Gracefully handle topology errors when tracing (fixes #14447)
(cherry picked from commit 11e7140d37b88264490928114665967df4f6cfa5)
History
#1 Updated by Maximilian Krambach almost 9 years ago
Further settings are "snapping on all layers, to vertex and segment, 10 pixel tolerance").
The exception raises whenever a tiny, but valid polygon (between bigger polygons, area < 0.1m², maximum width ~8mm) is on the canvas' extent. It raises an exception whenever a first point is set, or, if a first point was already set outside this area, whenever some snapping is calculated (whenever the mouse moves).
The layer's CRS is Gauss-Krueger based. The error does not depend on scale in this CRS.
Setting the OTF-reprojection to a UTM based CRS makes the error appear only in scale 1:5000 and smaller.
Setting it to EPSG:3857 (google Pseudomercator) makes the error disappear, which may serve as temporary workaround. Another workaround is removing the small areas (toolbox-> v.clean -> option rmarea) before further digitizing.
I think it is a rounding issue somewhere in qgsadvanceddigitizingwidget.cpp. Calculating 8mm in GK based systems and UTM based systems may make a difference, and there is some rounding going on in the file (example) .
#2 Updated by R. R. almost 9 years ago
- Assignee set to Saber Razmjooei
Thanks for debugging and the detailed explanation. After deleting all tiny polygons the tracing tool is working properly. I've assigned the ticket to Saber Razmjooei (see http://www.lutraconsulting.co.uk/blog/2016/02/16/qgis-trace-digitising/).
#3 Updated by R. R. almost 9 years ago
- File tracing.zip added
I've uploaded sample .shp files and a screenshot for reproducing the issue.
#4 Updated by Saber Razmjooei over 8 years ago
- Assignee changed from Saber Razmjooei to Martin Dobias
- Affected QGIS version changed from 2.14.0 to master
As mentioned, there seems to be a problem with the file.
However, the trace digitizing tool should show a more meaningful message.
Tested in the master with same result.
#5 Updated by Martin Dobias over 8 years ago
- Status changed from Open to Closed
Fixed in changeset 11e7140d37b88264490928114665967df4f6cfa5.
#6 Updated by R. R. over 8 years ago
Thanks for the bug fix. I've tested the attached file (QGIS 2.14.2) and it works just fine.