QGIS Polygons – Convert Fake Donut Holes to Real Ones

polygonqgis

I have this problem where I have to import shapefiles into our system which must be geometrically valid, but the software that everyone uses to produce them seems to output files where every polygon that should contain a hole is instead made up from a single outer ring which goes around the boundary and then goes inward along some arbitrary path, traces around what should be the inner ring, and then doubles back on itself back to the outside.

What I seek is a way to resolve these by somehow dissolving the vertices along the arbitrary path in and back out of the hole, to make a seperate inner and outer ring which will form a valid polygon. I have tried the trial version of ArcGIS and it seems to do this automagically when you snap the vertices on the double-back part together, but my business doesn't have a copy of ArcGIS and I might have a hard time convincing my boss to buy it, so I was hoping QGIS would allow me to do such a thing?

Screenshot:
description

I couldn't figure out how to get any WKT out of this sorry, but from playing around with the vertices I'm quite sure that it's one single ring that doubles back on itself for a bit.

Best Answer

Have your tried to apply a buffer with a distance 0?

enter image description here

Related Question