1

I have a single SHP-layer (12,810 features) and want first of all to identify intersections (incl. duplicates --> features with identical geometries). In the next step I want to delete/clip these intersections and assign them to one of the features so no intersections are present anymore. It would be best to assign the overlaps to those features where the area fraction of the overlaps is greatest (in the best case).

I´ve tried the Intersection Tool but in this case all of the features will be automatically selected (cause working only with 1 layer). Using the Topology Checker Plugin I get the table with overlap errors (using the rules: must not overlap + must not have duplicates). As a result all of the features with overlapping parts are highlighted but no layer has been created so I cannot create a spatial selection. But this also doesn´t help since I only want to identify the overlapping parts of polygons within a single layer and not select the whole polygons with overlapping parts (To select those features I can use the solution proposed by @Hast. Identifying overlapping polygons in single layer using QGIS?

Using the Check Geometries Plugin (similar settings to the Topology Checker Plugin) I only got again a a new layer (idential to the original one).

I suppose for this task either a PyQGIS script or a model in QGIS modeler is necessary. But I have no idea which QGIS processing tools should I use or which workaround.

Do you have any ideas?

original layer with overlaps: original layer with overlaps layer with intersection features (no overlaps): layer with intersection features (no overlaps) final dissolved layer: final dissolved layer

Update: How described below after running the Intersection tool I split the field with the FIDs with overlaps (e.g. 1|5|18 --> 1) via the field calculator and ran the Dissolvetool based on this field. Before that I ran the Fix geometrytool to repair the geometry (lots of editing errors were present). As you can see on the last screenshot some features haven´t been dissolved although for each feature at least 1 FID exists. (E.g. FID 27 in the original layer and 2 features which overlap with this one, so in the intersection layer 3 features with FID = 27 are present). After running the Dissolvetool, the Dissolved layer only contains the 2 intersection features but not that from the original layer (green))...

Do you have an idea why some features couldn´t been dissolved?

Using the Select by location tool (using the overlap parameter) (original layer vs. dissolved layer) selected much more features then it should which I also don´t understand. I manually selected the missing features (green) and merged them to the dissolved layer via Merge vector layers. After that I again ran the Dissolvedtool but again some intersections were still present.

  • In QGIS 3, SAGA has a Polygon self-intersection tool which can be accessed from the Processing Toolbox. Perhaps test this and see what kind of output you get? – Joseph Jul 26 at 11:55
  • As a result new features were created from intersections within a layer. These feature have Null values in the most attribute fields so selecting the original features with attribute information and exporting these a new layer without intersections can be generated. – Mapos Jul 26 at 13:02
  • But how can I assing the "overlapping" features to the original features based on the area? In the attribute table an additional column was generated (ID) containing the features which are affected by the overlapping (e.g. 124|127|129). The workflow should be something like: Select all features which have been created from the overlaps where at least one of the ID column has the same FID. Merge each of these features to the original features (ID column consists only from 1 FID value) where the share of the overlaping area is the biggest one. – Mapos Jul 26 at 13:14
  • You could run a Joins tool like Join attributes by location or Join attributes by field value etc with the new layer against the original. – Joseph Jul 26 at 13:18
  • Using Join attributes location or Join attributes by field value does not lead to the result I´d like to have. Additional fields in the attribute table of the original layer are added but the overlaps remain. After using the Polygon self-intersection tool from SAGA my idea was to split the field with the info which FID participate in each overlap (1|5|18 --> 1 etc.). After that I used the Dissolve tool to merge features with identical FIDs (before that I had to fix geometries of the intersection temporal layer). But still in the dissolved layer some overlaps remain. – Mapos Jul 29 at 12:45

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.