Bug report #10747

Cannot copy/paste points features

Added by Pinuccio D'Aquila over 5 years ago. Updated about 4 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Vectors
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

Description

New description:

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.
Provider errors:
OGR error creating feature -7: Attempt to write non-point (MULTIPOINT) geometry to point shapefile.

it works as expected in QGIS 2.2

Note:
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.

Recording__1.mp4 - video of what happens on my computer (882 KB) Laurence Bechet , 2015-09-24 08:23 PM

addPoint.zip - files to reproduce the issue (14.2 KB) Laurence Bechet , 2015-09-24 08:23 PM


Related issues

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 #16758: regression: adding a multi-part feature to a shapefile da... Closed 2017-06-27

Associated revisions

Revision a8ce3565
Added by Nathan Woodrow about 5 years ago

Fix #10747 - Don't force multi type on point features

Ref #10672 - Commited fix to force multitypes on shapefiles

Revision 8289891b
Added by Jürgen Fischer over 4 years ago

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.

Revision ce99b8ef
Added by Jürgen Fischer over 4 years ago

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)

Revision b65d9622
Added by Jürgen Fischer about 4 years ago

also fix #10747 for 2.5D points

History

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

Please file bugs in English.

#2 Updated by Giovanni Manghi over 5 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.

#3 Updated by Giovanni Manghi over 5 years ago

Hi,

is this about the "duplicate layer" option of the TOC, or about the digitizing tool "merge selected features"?

I ask because I see no issue with the first one, but I get the error you reported with the second one.

#4 Updated by Pinuccio D'Aquila over 5 years ago

sorry for the language...
The problem is the inability to duplicate point elements in shapefile format.
The error is due to the inability to perform the copy and paste of an item

#5 Updated by Giovanni Manghi over 5 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
thank

you have to help me understand, what do you mean with "duplicate point"? please make a list of steps/operations to follow. Thanks.

#6 Updated by Pinuccio D'Aquila over 5 years ago

The error is due to the inability to perform the copy and paste of an item.
Below the list of steps:
1)select point
2)copy point
3)paste point
thank

#7 Updated by Giovanni Manghi over 5 years ago

  • Target version set to Version 2.6
  • Subject changed from Cannot duplicate point layers to Cannot copy/paste points features
  • Priority changed from Normal to Severe/Regression

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

  • Target version changed from Version 2.6 to Future Release - High Priority

#9 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Feedback to Open

#10 Updated by Brett Z over 5 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.

#11 Updated by Nick R over 5 years ago

I'm also having the same issue as Brett Z and Pinuccio. The only work around I've found is to "Save as" the points you wish to copy and then "merge shapefiles into one". It's a bit of a headache.

#12 Updated by Thorsten Fischer over 5 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 over 5 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.

Any ideas?

#14 Updated by Leyan Ouyang over 5 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.

#15 Updated by Gavin Fleming about 5 years ago

Me too! Copying a point from one layer to another should just work as it has for many releases. In my case they are both shapefiles.

I can copy and paste but the same error as described above occurs on commit.

This is still an error on master.

#16 Updated by Torsten Ernst about 5 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.

#17 Updated by Jean-Pierre Vinadia about 5 years ago

The same problem and message is still happening in QGIS 2.5.0-Master / a3d3a44. Only one point cannot be copy/paste from a layer to another.

#18 Updated by Anonymous about 5 years ago

  • Status changed from Open to Closed

#19 Updated by Laurence Bechet about 4 years ago

I still have the problem with some files, Pisa 2.10 on Windows 7pro 64bits. See attached files.

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

  • Status changed from Reopened to Closed

#21 Updated by Jürgen Fischer over 2 years ago

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

Also available in: Atom PDF