1

I am using QGIS 3.16

I have a shapefile with an attribute table containing regions, district-numbers and building-numbers and I have an additional table (CSV) that (besides other relevant information) also contains regions, district-numbers and building-numbers. Different regions have different but often also the same district numbers. So region A can have district number 01 and building number 02 and the same is true for region B that can also have district number 01 and building number 02. My CSV table also includes regions, district numbers and building numbers that do not exist in my shapefile and vice versa.

Now I would like to join my shapefile with my CSV table based on all three criteria (region, district number and building number) to have a correct linkage. Cases that are included in the CSV table but do not have corresponding cases in the shapefile shall be listed in the attribute table of the shapefile after the join as well. In the end, I would like to have a shapefile where the attribute table contains:

  • The joined information from the CSV table
  • Additional cases from the CSV table where there are no corresponding cases in the shapefile (imagine my CSV table also includes region C and XYZ).
Vince
20.5k16 gold badges49 silver badges65 bronze badges
asked Dec 2, 2021 at 9:19
0

1 Answer 1

1

After searching for a solution within a group of other GIS-experienced user I found the answer to my question; it is explained in this thread:

QGIS joins 2 FIELDS

So basically you create a new column (data field) in your table (e.g. Excel spreadsheet) and a corresponding one in your attribute table of your shapefile. The newly created column should contain the information of all the columns or fields you want to join. So if you want your join being based on three different columns (A), (B), (C), you can create a column (D) that contains the information of all these columns --> (D) = (A+B+C). Afterwards you just need to join column (D).

answered Dec 13, 2021 at 8:47

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.