Bug report #16792

Fails to handle multipart features as shapefile geometry type after merging

Added by Andreas Wicht about 3 years ago. Updated about 3 years ago.

Status:Closed
Priority:High
Assignee:-
Category:Digitising
Affected QGIS version:2.18.10 Regression?:Yes
Operating System:Windows 7 / Ubuntu 16.04 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:24691

Description

Since the new patch to 2.18.10 QGIS seems to have problems with the Geometrytypes for (at least) Shapefiles.

Following steps to reproduce:
- create new polygon shapefile
- add 2 disjoint polygons
- use "merge selected features" tool to create a multipart polygon
- save edits

The edits will not be saved, throwing following error message:

Could not commit changes to layer <layername here>

Errors: ERROR: 1 feature(s) not added - geometry type is not compatible with the current layer.

This exact operation work just fine in version 2.18.9.

If a shapefile exists which already contains multipart features, those are displayed correctly. If single part features are added to that shapefile it is also possible to save. New multipart features would cause above mentioned error message.


Related issues

Related to QGIS Application - Bug report #16758: regression: adding a multi-part feature to a shapefile da... Closed 2017-06-27

Associated revisions

Revision d19ed1c6
Added by Jürgen Fischer about 3 years ago

Only convert geometries to provider type when provider does strict type checking (ie. not for shapes; fixes #16593, #16784, #16792, #16770, followup 53d90b547)

Revision ecae3c95
Added by Jürgen Fischer about 3 years ago

Only convert geometries to provider type when provider does strict type checking
(ie. not for shapes; fixes #16593, #16784, #16792, #16770;
followup 87116abd72; forward ported from d19ed1c6)

History

#1 Updated by Almerio Moreira about 3 years ago

The same error occurs with lines shapefiles even with two matching vertex (snapped)of two line features after use "merge selected features" and try to save.

I did this exact same operaction with the same shapefile on LTR Version 2.14.16 with no problems.

#2 Updated by Giovanni Manghi about 3 years ago

  • Regression? changed from No to Yes
  • Assignee deleted (Victor Olaya)
  • Category changed from Processing/Core to Digitising

#3 Updated by Giovanni Manghi about 3 years ago

  • Status changed from Open to Feedback

likely duplicated of #16758

#4 Updated by Jürgen Fischer about 3 years ago

  • Related to Bug report #16758: regression: adding a multi-part feature to a shapefile dataset fails added

#5 Updated by Jürgen Fischer about 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Feedback to Closed

Also available in: Atom PDF