Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
1  
Can you post a screenshot and maybe a WKT output? –  blah238 Jul 5 '12 at 4:26
    
Yes wkt might help identify issue..to get WKT,select one such polygon feature > Press Ctrl+C(or Edit Menu > Copy Features). Open notepad and paste there. Copy the WKT part to your post. –  vinayan Jul 5 '12 at 6:26

1 Answer 1

up vote 9 down vote accepted

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

enter image description here

share|improve this answer
    
That worked a treat, thanks! The thought had occurred to me but ArcGIS edit tool's Buffer facility doesn't accept 0 as an argument, which mislead me into thinking it was something that was considered nonsense, but now that I think about it, the edit tool was actually performing a zero buffer upon each edit all by itself. –  Sam Jul 5 '12 at 22:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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