Bug report #2829

qgis doesn't show any message/warning when splitting a polygon with an invalid geometry

Added by xr6ute - almost 14 years ago. Updated almost 13 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Digitising
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:12889

Description

While editing a shape file, trying to split the feature has no affect. Trying to split the same shape file with v1.2.0 used to cause a crash.
Creating a new ring and splitting that does work as expected.

WEIR.zip - Sample shape file. (10.3 KB) xr6ute -, 2010-06-21 10:00 PM

Screenshot.png (159 KB) Giovanni Manghi, 2010-06-22 01:09 AM

Associated revisions

Revision 51299c1e
Added by Jürgen Fischer almost 13 years ago

fix #2829

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15812 c8812cc2-4d05-0410-92ff-de0c093fc19c

Revision f33d9f2e
Added by Jürgen Fischer almost 13 years ago

fix #2829

git-svn-id: http://svn.osgeo.org/qgis/trunk@15812 c8812cc2-4d05-0410-92ff-de0c093fc19c

History

#1 Updated by Paolo Cavallini almost 14 years ago

Confirmed. In my case, it crashes with:

Error:

GDAL Error 1: [[TopologyException]]: found non-noded intersection between LINESTRING (138.783 -34.5531, 138.783 -34.5531) and LINESTRING (138.783 -34.5531, 138.783 -34.5531) at 138.783 -34.5531

Segmentation fault

#2 Updated by Giovanni Manghi almost 14 years ago

see attached image. The geometry does not seems correct. Fix it and the tool will work fine.

#3 Updated by Jürgen Fischer almost 14 years ago

Replying to [comment:2 pcav]:

Confirmed. In my case, it crashes with:

No crash here.

Error:

GDAL Error 1: TopologyException: found non-noded intersection between LINESTRING (138.783 -34.5531, 138.783 -34.5531) and LINESTRING (138.783 -34.5531, 138.783 -34.5531) at 138.783 -34.5531

GDAL? Strange. There should be a GEOS exception, if any. Although the rest of the message looks like one. Doesn't this only crash with some plugins involved?

#4 Updated by Paolo Cavallini almost 14 years ago

So we got another problem now: I suspected the layer was invalid, so I checked with fTools, which it couldn't find the error.
Two issues then:

- QGIS shouldn't crash in case of editing invalid geometries, and it should report a meaningful error when trying to manipulate them

- incorrect geometries should be found by fTools (probably better opening a ticket on this)

#5 Updated by Paolo Cavallini almost 14 years ago

Right: uninstalling SDA4PP plugin removes the crash. A meaningful erro message would be good to have anyway.

#6 Updated by xr6ute - almost 14 years ago

Sorry about the bad geometry file I hadn't noticed that, and I can confirm Lutra is correct, once I fixed the geometry the tool worked as expected.
Thanks for looking in to this, the response is exceptional, inline with the overall QGIS experience :-).

#7 Updated by Giovanni Manghi almost 14 years ago

New description:

See attached polygon shapefile. It has an invalid geometry and if you try to split it qgis does nothing. It should throw a message/warning.

#8 Updated by Jürgen Fischer almost 13 years ago

fixed in f33d9f2e (SVN r15813).

#9 Updated by Jürgen Fischer almost 13 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Also available in: Atom PDF