1

I have a layer of 2053 polygons. Some of these have errors. I corrected these errors with Processing LWGEOM Provider. The outputfile have the corrected polygons only.

How do I merge the corrected ones with the old and in the same time deleting the old polygons with errors?

I've attached 2 pictures. The Green layer is the corrected polygons The pink layer is the original layer with some errors Corrected polygons Original with errors

1

First, use the 'select by location' tool to select those polygons from the old layer that intersect with the new, fixed polygons. Depending on what happened to the geometry when you 'fixed' them, you may have to play around a little with the geometric predicate (intersects, equals, overlaps, etc) until you obtain the expected selections.This will also depend on the topological relationships of your source layer and how that was altered when you 'corrected' your polygons.

After you have selected them, simply enter an edit session and delete them.

To finish, simply copy and paste all the polygons from the corrected layer into the original layer.

  • There is the "select within" plugin that might be useful for your methodology. Since you can select polygons where their centroid intersects a polygon. Avoiding the selection of partially overlapping or touching polygons. – HeikkiVesanto Dec 13 '17 at 16:44
  • 1
    That's a great idea, thanks for the addition. Could certainly solve some potential issues depending on what happened in the 'correction' process and/or what the relationships were before. – pdavis Dec 13 '17 at 16:47
  • Yeah but the problem is that there are so many. If it had been like 10 of them it wouldn't be an issue but now there is around 300. Like an inverted spatial query. So everything else around dual polygon gets highlighted. Then i would just save the highligthed ones to a new layer and the merge the 2 correct layers. – Tobbe Dec 13 '17 at 18:18

Your Answer

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

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