3

I'm fairly new to QGIS and struggle with a problem for a while now: I have two Shapefiles that are nearly identical, but have a few different Shapes in them. They also contain a few attributes. I want to merge them together.

So I merged the two Shapfiles together with the Intersection-Algorithm of QGIS. The Intersected Shapefile now contains the attributes i want, but also a lot of double attributes, like in the picture below the attribute in row 1 and 2. The one in row 1 is correct, and the other one incorrect (it doesn't fit to the attribute wbz_2)

I want a list with only the correct matched attributes. I tried to dissolve the list after the attribute "wbz" but that produces a lot of false matches. How can i only get the right matches? (right matches = where wbz equals wbz_2)

enter image description here

1
  • Try using one of the advanced select tools to select only the features you want to merge. Possibly the "select by attribute" tool will work. Then run the intersection on only the selected features. – csk Jul 16 '20 at 16:12
2

I think this tutorial can help you out. Since your intersection gave you all of the attributes you want, one way to solve your problem is just to get rid of all the extra stuff. It's maybe not the most efficient, but it could save some headbanging.

If you toggle editing on your layer, and then click select > select by expression. You can then select depending on: "wbz" IS NOT "wbz_2"

Once you have all of your wrong attributes selected, you can delete them all and you should be left with just the right attributes.

This tutorial shows someone going through a very similar workflow (deleting all the counties that have a state name which is not texas).

https://mangomap.com/industries/web-mapping/tutorials/remove-unwanted-regions-from-map-data.html#step2

1
  • Thanks you for your effort! – Felix Jul 21 '20 at 8:35

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.