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 a shapefile that consists of a single polygon. I have gaps within the polygon that needs to be eliminated, but only the ones that are less than 200m2.

I tried different ways but none of them work, I need to run this process as a batch process.

Any ideas?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

1) create polygons where you have a hole. This can be done with the "difference" tool (just manually draw a large polygon in another layer, or do it with the buffer tool).

2) select the polygons which are less than 200m² and merge those with your original shapefile (you can use the union tool).

3) use the dissolve tool to revert to a single polygon

share|improve this answer
    
Thanks for the answer, I forgot to mention that i need to run this as a batch process, so during the batch I cannot select the polygons with area less than 200m2. Any other idea? –  Aram Aug 14 at 10:18
    
you can do a selection during the batch. e.g. with sextante.runalg("qgis:selectbyattribute","yourshp","AREA",4,200) –  radouxju Aug 14 at 11:37

Googling a bit I came to know this "ringer" experimental plugin for qgis, which seems to be good for your task. If this works (I did not test it), this would let you convert your holes into polygons. Then you would create a new field in the attribute table of the new polygons and calculate their area (with the field calculator). Then you would merge the hole polygons with your original polygon, selecting only those holes which are larger than 200m2. Hope this helps.

share|improve this answer
    
I should mention that I use qgis 2.4 and it does not work here since it has been written for another version (not soecified in the page). –  umbe1987 Aug 14 at 9:41
    
Thanks for the answer, I will have a look tomorrow on that plugin, but as far as undertand, i will need to select the polygons, and i didn't mention, I just changed the question, I need to run this in a bach run, I have thousands of layers to clean. Any Idea? regards –  Aram Aug 14 at 10:20

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.