2

Looking at this map data from naturalearth (part of Oman & UAE to be specific), each country is defined as a multipolygon. In this case UAE (in red) contains two polygons and Oman (beige) three.

Polygon inside polygon

Problem is that QGIS claims UAE to be invalid, since the smaller polygon is "inside" the other one. I've tried making the small polygon a ring instead, but that's also not okay, since it does not touch the other ring.

How should this be organized in order to be valid? Must these be separate features? Joined physically?

1

It's multipolygons with interior rings geometry. It is a valid, but more complicated geometry. You must use an Advanced Digitizing Toolbar with tools Add Ring and Add Part.

| improve this answer | |
  • 2
    The geometry is already created. If I run "Vector"->"Geometry Tools"->"Check geometry validity" from menu I get error ("Polygon inside polygon"). – Oystein Jan 27 '14 at 16:32
1

I get exactly the same error with a polygon that is not inside another "real" polygon, so the problem is (probably) that there is some "hidden" vertices somewhere, not that the feature is a multipolygon.

Unfortunately I haven't found a way to solve the problem yet - using the node tool doesn't seem to help - but I'll be back whenever/if I find a solution to this problem. Suggestion are most welcome :)

| improve this answer | |
  • Interesting, what do you mean by hidden vertices and non-real polygons? – Oystein Jan 27 '14 at 17:20
  • I have 1 polygon with no rings, no parts and not touching anything else but the Geometry validation tool tells me that there's a "polygon 0 inside polygon 1". If it was actually two overlapping polygons, I should be able to see all vertices with the node tool hence being able to delete/alter the problem polygon but as far as I can see there are no vertices connected to polygon 0 (info shows when you mouse over the vertices) - that's why I called them "hidden" in lack of a better word. Still struggling with figuring out what to do... – Laura Beck Jan 27 '14 at 19:55
1

Try running multipart to singleparts from Vector > Geometry Tools, then use attributes to remerge polygons if necessary.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.