Bug report #14447

Unknown exception when tracing is enabled

Added by R. R. almost 9 years ago. Updated over 8 years ago.

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.

tracing_unknown_exception.jpg (343 KB) R. R., 2016-03-09 04:37 AM

tracing.zip (165 KB) R. R., 2016-03-24 11:20 AM

Associated revisions

Revision 11e7140d
Added by Martin Dobias over 8 years ago

Gracefully handle topology errors when tracing (fixes #14447)

Revision 80102b1a
Added by Martin Dobias over 8 years ago

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

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

#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.

Also available in: Atom PDF