Bug report #10672
regression: impossible to paste polygon into newly created shapefile
Status: | Closed | ||
---|---|---|---|
Priority: | Severe/Regression | ||
Assignee: | Denis Rouzaud | ||
Category: | Vectors | ||
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 #: | 19071 |
Description
- Create a new project, and add the attached polygon shapefiles (provinces.shp and rcaf_regions.shp)
- Turn rcaf_regions layer's edit mode on.
- On the provinces layer, select the polygon with PROV_NAME equating 'Kampong Thom' (it's the middle one to the right of the inner empty space)
- Copy the polygon
- Try and paste the polygon onto the rcaf_region layer, it will reject with the following message bar: "no features could be successfully pasted"
This is highly problematic, and works perfectly fine under QGIS 2.2.
Related issues
Associated revisions
fix #10672: force multi when pasting on a shapefile
Move information about strict provider geometry type check on point shapefiles
to OGR provider and make use of it when pasting & merging features
(fixes #12488, refs #10672, refs #10747)
TODO: check if other OGR drivers have similar restrictions.
(cherry picked from commit 8289891b78953581f22e944565e0e1c9678a09c3)
History
#1 Updated by Mathieu Pellerin - nIRV over 10 years ago
I should have added that most polygons can be pasted onto the rcaf_region layer, but the provinces polygon named 'Kampong Thom' fails.
#2 Updated by Denis Rouzaud over 10 years ago
- Assignee set to Denis Rouzaud
#3 Updated by Denis Rouzaud over 10 years ago
- File pasteshape.zip added
The problem is that the feature is multipart but the destination layer is known as single part, so nothing can be paste.
I believe the problem is that shapefiles should always (?) be considered as multipart.
I am not sure where to handle this.
in QGisApp::editPaste: if layer is shape, force multi in conversion?
#4 Updated by Denis Rouzaud over 10 years ago
#5 Updated by Pedro Venâncio over 10 years ago
I confirm this also with lines / multilines.
Waiting for Denis PR be accepted and merged.
Thanks Denis!
#6 Updated by Martin Dobias over 10 years ago
- Status changed from Open to Closed
Fixed in changeset 39eaff90975e533d0e71293511c5181f8ce7d0d2.
#7 Updated by Jürgen Fischer over 7 years ago
- Related to Bug report #16758: regression: adding a multi-part feature to a shapefile dataset fails added