Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging of multipolygons fail/issues #12248

Closed
qgib opened this issue Dec 3, 2009 · 3 comments
Closed

Merging of multipolygons fail/issues #12248

qgib opened this issue Dec 3, 2009 · 3 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS
Milestone

Comments

@qgib
Copy link
Contributor

qgib commented Dec 3, 2009

Author Name: Giovanni Manghi (@gioman)
Original Redmine Issue: 2188

Redmine category:build/install
Assignee: nobody -


This ticket was open after the observations made here

http://lists.osgeo.org/pipermail/qgis-developer/2009-December/008552.html

To replicate:
use the "regions" layer you can find in the spatialite sample dataset: you can save it as shapefile and import to postgis. Tested also with other layers, like the "world borders" vector.

a) In postgis and Spatialite (in a multipolygon type of layer), merging adjacent or overlapping features returns

"The union operation would result in a geometry type that is not
compatible with the current layer and therefore is canceled"

b) The same message appear when you try to merge non adjacent or non overlapping features (or features with islands) in shapes

c) With Postgis and spatialite is still possible to merge non adjacent or non overlapping features (or features with islands), but actually in trunk (not in 1.3) it returns errors see #12247

@qgib
Copy link
Contributor Author

qgib commented Dec 3, 2009

Author Name: Marco Hugentobler (@mhugent)


a) is a bug and should be fixed in 25264aa (SVN r12328)

b) is most likely in a polygon type layer (not multipolygon)?
The merge of non-adjacent features would result in a multipolygon feature. And most datasources consequently reject multipolygons in polygon layers (e.g. postgis), while shape does not. The editing code cannot know if the datasource allows that or not, so it is rejected.

c) could be a problem that arises if (during commit), features are added before deleted .

@qgib
Copy link
Contributor Author

qgib commented Dec 3, 2009

Author Name: Giovanni Manghi (@gioman)


a) yes, it works now, but still c) (by the way spatialite seems already fixed, not postgis)

b) so, the bottom line is (please forgive me if I'm saying something stupid): if I have a polygon type shapefile I cannot merge non-adjacent features to obtain a multipolygon feature (just in qgis or is the general rule?), but if export that layer to postgis as multipolygon then I can merge non-adjacent features and export back to shapefile to obtain a multipolygon type one. Right?

I guess that this can be closed then.

@qgib
Copy link
Contributor Author

qgib commented Dec 6, 2009

Author Name: Marco Hugentobler (@mhugent)


I think 3e5d66d (SVN r12341) makes everyone happy, disable a geometry type check for shapes (even if it is not good practice to have a polygon layer with multipolygons in it).


  • resolution was changed from to fixed
  • status_id was changed from Open to Closed

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS labels May 24, 2019
@qgib qgib added this to the Version 1.4.0 milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Build/Install Related to compiling or installing QGIS
Projects
None yet
Development

No branches or pull requests

1 participant