Opened 14 years ago

Closed 13 years ago

#2829 closed bug (fixed)

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

Reported by: xr6ute Owned by: nobody
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Digitising Version: Trunk
Keywords: Split Polygon Shapefile Cc: xr6_ute@…
Must Fix for Release: No Platform: All
Platform Version: XP SP2 Awaiting user input: no

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.

Attachments (2)

WEIR.zip (10.3 KB ) - added by xr6ute 14 years ago.
Sample shape file.
Screenshot.png (159.5 KB ) - added by lutra 14 years ago.

Download all attachments as: .zip

Change History (15)

by xr6ute, 14 years ago

Attachment: WEIR.zip added

Sample shape file.

comment:1 by xr6ute, 14 years ago

Version: HEAD1.4.0

comment:2 by pcav, 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

comment:3 by lutra, 14 years ago

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

by lutra, 14 years ago

Attachment: Screenshot.png added

in reply to:  2 comment:4 by jef, 14 years ago

Replying to 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?

comment:5 by pcav, 14 years ago

Platform: WindowsAll
Summary: Split shape file polygon fails.Split shape file polygon fails

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)

comment:6 by pcav, 14 years ago

Version: 1.4.0HEAD

comment:7 by pcav, 14 years ago

Component: Data ProviderDigitising

comment:8 by pcav, 14 years ago

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

comment:9 by xr6ute, 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 :-).

comment:10 by lutra, 14 years ago

Summary: Split shape file polygon failsqgis doesn't show any message/warning when splitting a polygon with an invalid geometry

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.

comment:11 by pcav, 14 years ago

Milestone: Version 1.5.0Version 1.6.0

comment:12 by jef, 13 years ago

fixed in r15812.

comment:13 by jef, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.