Bug report #16758

regression: adding a multi-part feature to a shapefile dataset fails

Added by Mathieu Pellerin - nIRV over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:High
Assignee:Mathieu Pellerin - nIRV
Category:Data Provider/OGR
Affected QGIS version:2.18.10 Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:24657

Description

Under QGIS master, adding (or pasting) a multi-part feature into a shapefile dataset fails. The feature is added, but the dataset can't be saved.

Steps to reproduce
  1. Create a new shapefile, add it to an empty QGIS project
  2. Switch the edit mode to on, and add a multi-part feature
  3. Try to save the dataset, you'll be thrown the following error: "could not commit change to your layer {name}"

This proposed PR, https://github.com/qgis/QGIS/pull/4782, fixes the above-mentioned regression.


Related issues

Related to QGIS Application - Bug report #16784: Creation of MultiPolygon shapefile with QgsVectorFileWriter Closed 2017-07-03
Related to QGIS Application - Bug report #16792: Fails to handle multipart features as shapefile geometry ... Closed 2017-07-05
Related to QGIS Application - Bug report #16770: copy/paste/save features from one layer to another of th... Closed 2017-06-30
Related to QGIS Application - Bug report #12488: Impossible to merge features in a point shapefile Closed 2015-04-01
Related to QGIS Application - Bug report #10672: regression: impossible to paste polygon into newly create... Closed 2014-06-23
Related to QGIS Application - Bug report #10747: Cannot copy/paste points features Closed 2014-06-28

Associated revisions

Revision d19ed1c6
Added by Jürgen Fischer over 6 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 over 6 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 Giovanni Manghi over 6 years ago

  • Affected QGIS version changed from master to 2.18.10

This affects also 2.18.10
see #16784 and #16792

#2 Updated by Giovanni Manghi over 6 years ago

likely to have caused also #16770

#3 Updated by Jürgen Fischer over 6 years ago

  • Related to Bug report #16784: Creation of MultiPolygon shapefile with QgsVectorFileWriter added

#4 Updated by Jürgen Fischer over 6 years ago

  • Related to Bug report #16792: Fails to handle multipart features as shapefile geometry type after merging added

#5 Updated by Jürgen Fischer over 6 years ago

  • Related to Bug report #16770: copy/paste/save features from one layer to another of the same time broke in 2.18 added

#6 Updated by Jürgen Fischer over 6 years ago

  • Related to Bug report #12488: Impossible to merge features in a point shapefile added

#7 Updated by Jürgen Fischer over 6 years ago

  • Related to Bug report #10672: regression: impossible to paste polygon into newly created shapefile added

#8 Updated by Jürgen Fischer over 6 years ago

#9 Updated by Giovanni Manghi over 6 years ago

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

closing this because PR has been merged and there was also a backport for 2.18. I anyway still see this problem at least with one specific point dataset and on Windows/master. See #16870-8

Also available in: Atom PDF