I would like to use the 'Eliminate sliver polygons' in QGIS, but only if they have the same attributes.

To be more specific, I have an administrative shapefile that was created with the SEXTANTE tool 'Union', and which contains cities and villages. Some villages are in cities, some others are half-half, and others are out of the cities. Some of the villages have (very small enclaves) in other villages. The output of the union tool has a lot of sliver polygons, which I would like to merge.. but if I do that with QGIS 'Eliminate Sliver polygon', selecting polygons per area, it will dissolve my enclaves into the wrong polygon. So I would like to know if there is a way to give a condition for the merging other than biggest polygon/longest boundary.

Is there a way to merge only if this biggest polygon/longest boundary has the same attributes?

My current idea is to 'identify' my enclaves by:

  1. calculating each polygon' area before using the union tool
  2. calculating their area after the union
  3. select polygons that:

    a. changed of area

    b. are below a certain threshold.

Would there be a faster way to do this?

  • Which QGIS version are you using? "Sextante" has been replaced by "Processing" and in the latest version of the plugin, the Eliminate sliver polygons tool from the Processing Toolbox has additional options to allow you to select features with attributes =) – Joseph Feb 9 '16 at 10:46
  • Awesome. I have the latest version, but I had only checked the Vector / Geoprocessing tools! I will check that, but it looks like the 'union' from the Processing Toolbox created slivers between polygons that were in the same layer but did not have any topological error.. Do you know if it's possible to avoid this? – Mike Atomat Feb 9 '16 at 11:07
  • Yeah, some tools from the Processing Toolbox has additional options not available from the GUI toolbars. Hopefully this should help you a little :) – Joseph Feb 9 '16 at 11:09
  • You can try to minimise the risk of slivers by using GRASS tools such as v.generalize or v.clean as described in this post – Joseph Feb 9 '16 at 11:26
  • Thanks! My dataset has many enclaves and islands I don't want to lose, so I don't think generalize/clean is an option for me. I cleaned the couple of topology mistakes picked up by QGIS though, but that was not many. Would there be a way to make a cleaner union? I checked the eliminate sliver polygons from Processing Toolbox but these options are for selecting the polygons to merge, not for deciding which polygon should be merged or not. – Mike Atomat Feb 10 '16 at 7:40

Your Answer

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

Browse other questions tagged or ask your own question.