QGIS – How to Automatically Fill Gaps and Merge Polygons Using Longest Adjacent Polygon

gapgeneralizationgrassqgisslivers

I get polylines automatically generated from AutoCAD from a colleague. Converting them into polygons with QGIS 3.6, I find out some sliver polygons and gaps in between, as shown in the picture below :

Raw data

So far, I am correcting mostly by hand which is time consuming, as detailed follow :

To get rid of sliver polygons, I am using the command v.generalize from the GRASS Module, then remove the duplicated geometries and merge manually polygons with the same number.

To fill gaps, I am adding a new feature by clicking on the gap with the tool "Fill gapp with a new feature" from the digitizing tool plugin, and merge manually polygons.

Any of you have an idea to automate the process, or at least speed it up?

The aim is to get a result like this :

Expected result

Best Answer

First of all many thanks for your answers.

@Cyril I indeed do this to fill the gaps

@RGfromRWBJV I also use this tool to clean the layer

@markusN I also used this solution to clean the layer

There is no simple solution on this. Despite these functions, none of them are perfect.

Therefore the simplest way to do this is : - the snapping option from the cleaning/generalizing tool, - drawing a polygons covering the entire surface, using the symmetrical differences to generates the polygons and fulfill the "holes" in using the function "Eliminate Selected Polygons with the option "sharing the largest common boundary with the adjacent polygon"

Related Question