Bug report #13359

merge two polygons deletes one of them

Added by Jos Ferraro about 5 years ago. Updated about 5 years ago.

Status:Closed
Priority:Low
Assignee:-
Category:Digitising
Affected QGIS version:2.6.1 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21412

Description

When trying to merge two features, one of them is simpçy deleted.
The attached file shows the problem. Basically you select the feature 0 and any of its neighboors and try to merge.
The neighboor disappears.

disappearing_feature.rar (2.74 KB) Jos Ferraro, 2015-09-14 11:09 AM

History

#1 Updated by Saber Razmjooei about 5 years ago

  • Priority changed from Normal to Low
  • Status changed from Open to Feedback

Works fine in 2.8.3

Feature 2 seems a bit odd. Worth deleting and trying.

#2 Updated by Jos Ferraro about 5 years ago

Sorry, I made a mistake.
The feature that makes things dissapears is the third one(FID 2).
In effect it seems that the order of the features is important. The feature that is deleted is always the one with higher ID.
So the problem is: when trying to merge feature with FID 2 and feature with FID 0, the feature FID 2 is deleted instead os being merged.
In the shapefile whece I cut this one the order of the features was inverted and it was therefore the big one that dissapeared.
About deleting feature FID 2 : That's exactly what I wanted to do, but I wanted to merge with it's neighboors so not to have a gap.

Once again, sorry for the mistake
BTW, tested with 2.8.3 and the problem is NOT solved

#3 Updated by Jukka Rahkonen about 5 years ago

Geometry FID=2 is

POLYGON ((
-43.208452 -22.909126,
-43.207489 -22.908866,
-43.206147 -22.908303,
-43.207488 -22.908866,
-43.208452 -22.909126
), (
-43.209573 -22.909271,
-43.20957519759788 -22.90923750003237,
-43.20957519759788 -22.909237500032372,
-43.209573 -22.909271
))

It has a topology error "Hole lies outside shell". QGIS Check geometry validity tool reports it in another words "2,ring 1 of polygon 0 not in exterior ring
2,Geometry has 1 errors."

This is not a QGIS bug unless you can reproduce it with valid geometries.

#4 Updated by Jos Ferraro about 5 years ago

  • Status changed from Feedback to Closed

Indeed, the geometry is invalid.
This invalid geometry was however created by QGIS itself, so I reported a new bug #13368 and will close this one
Thanks for helping

Also available in: Atom PDF