Bug report #10747
Cannot copy/paste points features
|Affected QGIS version:||2.4.0||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||19131|
in QGIS 2.4 is not possible copy/paste point features (tested shapefiles), error is
Could not commit changes to layer teste
Errors: ERROR: 1 feature(s) not added.
OGR error creating feature -7: Attempt to write non-point (MULTIPOINT) geometry to point shapefile.
it works as expected in QGIS 2.2
with point shapefiles also the operation "merge selected features" fails on save.
The error is the same. This issue happens down to 1.8 included, but in the 2.x series there is a difference: once discarding edits on save the selected features are lost, while on 1.8 at least are not lost.
TODO: check if other OGR drivers have similar restrictions.
(cherry picked from commit 8289891b78953581f22e944565e0e1c9678a09c3)
#2 Updated by Giovanni Manghi about 6 years ago
- Subject changed from Errore di duplicazione punto to Cannot duplicate point layers
- Category set to Vectors
- Status changed from Open to Feedback
- Affected QGIS version changed from master to 2.4.0
I cannot replicate the issue.
What is the datasource? shape? postgis? other?
if possible attach sample data.
#5 Updated by Giovanni Manghi about 6 years ago
Pinuccio D'Aquila wrote:
sorry for the language...
the problem is the inability to duplicate point elements in shapefile format.
Version of qgis 2.4
you have to help me understand, what do you mean with "duplicate point"? please make a list of steps/operations to follow. Thanks.
#10 Updated by Brett Z about 6 years ago
I have the same issue. You can reproduce it by creating 2 new POINT shapefiles, adding points to each, and saving. Then, as Pinuccio described, try copying points from one shapefile to another and you will get the error "Attempt to write non-point (MULTIPOINT) geometry to point shapefile." when you click save. I confirmed that both shapfiles are POINT type, not MULTIPOINT. This seems to occur with shapefiles created in QGIS and in other applications.
#12 Updated by Thorsten Fischer about 6 years ago
I don't mean to start a wave of "me, too!" here, but I'd still like to mention that this issue also occurs when the source layer is a PostGIS point layer. As with the other reporters so far, my target layer is also a shapefile. The issue has started occurring for me in 2.4. It did not occur in 2.2.
I presume the code now treats the copying of multiple points as a copy of a single multipoint feature, rather than as a copy of multiple point features.
Also, this problem severely impairs my workflow now.
#13 Updated by Thorsten Fischer almost 6 years ago
Is there a workaround for this? I've got unprocessed data accumulating for more than a month now, because I can not easily copy points between layers. Any workaround I can imagine would involve several mouse clicks per point, which is not a feasible workflow. I can also not easily downgrade the software (copying points between layers worked in 2.2), because there are no downgraded binary packages available any more for my distro (Ubuntu saucy, using the ubuntugis ppa). And even if I could downgrade, QGIS has already converted the project file to the format matching the new version.
#14 Updated by Leyan Ouyang almost 6 years ago
Could you do your data editing in a Spatialite layer, then at the end save it as a Shapefile? Spatialite supports multipoints, so there is no issue with the copy and paste. The copied points are actually single points, so you don't even need to run a multipart to single part conversion, you can directly use save as.
#16 Updated by Torsten Ernst almost 6 years ago
I see the same behavior working within the same shapefile. I selected a number of points, pasted them into the same layer, moved the new points (to offset them from the originals) and I get the error stated by Pinuccio. From my experience you only need one shapefile to duplicate the error. OS X, QGIS 2.4.