Feature request #16974

Merge Selected Features - warn user in advance when merged geometry type does not match layer geometry type

Added by Peteris Bruns over 7 years ago. Updated over 7 years ago.

Status:Closed
Priority:High
Assignee:Giovanni Manghi
Category:Editing
Pull Request or Patch supplied:No Resolution:duplicate
Easy fix?:No Copied to github as #:24873

Description

In case when merged geometry type does not match layer geometry type warning should appear already in Merge Selected Features dialogue, not after several 10 object merge on Save receive surprise message. This makes bad user experience since in message is not possible to identify wrong geometry/feature.

Solution would be to warn user already in Merge Selected Features dialogue in case when merged feature final geometry type is not equal to target layer geometry type.

As in example.png
  • ShapeFile/PostGIS layer with geometry type LineString.
  • several Linestring features.
  • try to merge 2 features without common start/end points, result is MultiLineString (in dialogue should be as minimum warning, probably disabled OK button while resulting geometry is not compatible with target layer geometry type)

In cases when user has merged several features, a+b=a Linestring, c+d=c Multilinestring on save both changes from QGIS is received message
"Could not commit changes to layer LineString Layer Errors: ERROR: 2 feature(s) not added - geometry type is not compatible with the current layer." but this message does not help to identify wrong feature and fix it. Usually user cancels edit and loses all work without save and repeats feature merge again while faces the problematic features and fixes.

Related to issues #15741 #16792

example.png (239 KB) Peteris Bruns, 2017-08-06 10:34 AM

vokoscreen-2017-08-08_21-47-26.mkv (1020 KB) Peteris Bruns, 2017-08-08 08:56 PM

bug_examples.gpkg (108 KB) Peteris Bruns, 2017-08-08 08:59 PM

History

#1 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? changed from Yes to No
  • Status changed from Open to Feedback

Actually this WAS the way QGIS used to work.

In fact in QGIS 2.14 trying to create a multi part geometry in a non multi part layer resulted in CLEAR message BEFORE the user clicked on "save edits".

See #15741-3

if this not fixed as the above ticket suggest than #15741 must be reopened.

#2 Updated by Peteris Bruns over 7 years ago

Thanks for pointing #15741-3, in QGIS 2.18.11 I can't see message and behavior as described in #15741-3.

Testing with QGIS 2.18.11, linestring layer (GPKG, ESRI ShapeFile, memory layer). Attached data example and video.

First merges is OK, the 2nd is buggy.

In this case is visually clear wich merge is buggy, but if user has made several, 10 and more, similar merge actions before save, then from save message is impossible to identify where is bug. Cancel all edits and start again.

So far seems that #15741 must be reopened.

#3 Updated by Peteris Bruns over 7 years ago

  • Assignee set to Giovanni Manghi

#15741 must be reopened.

#4 Updated by Giovanni Manghi over 7 years ago

  • Status changed from Feedback to Closed
  • Resolution set to duplicate

done.

Also available in: Atom PDF