1

I am using QGIS 2.8.9 Wien, and trying to add data from a CSV file to an existing vector file. At the "add vector join" stage the join layer drop down only shows the vector shapefile, so I find I can only able to add data from the shapefile to the CSV, not the other way round. I would expect both files to appear on the drop down list so I could select the CSV file and go from there.

What am I doing wrong?

2
  • Welcome to GIS:SE @Andrew! Have you considered downloading a more up-to-date version of QGIS? I have 2.12, 2.14, 2.16 and 2.18 and all of them seem to work fine.
    – Joseph
    Commented Feb 16, 2017 at 12:12
  • I don't know if it is possible to add csv directly to a vector layer. I assume you have allready added the CSV file as a layer? I usually save my imported CSV files as shapefiles so I can edit them(right click on CSV layer-->save as..). Joining two vector files is a lot easier to be honest. Maybe using the NNJOIN plugin could provide some solutions. Commented Feb 16, 2017 at 13:08

1 Answer 1

2

In order to add data from an external database (either in csv format or dbf format) to a shape file I ussualy do it as follows. Keep in mind that both the vector layer and the external attribute table must have a field with the same type of information.

1) Open the vector layer

2) Open the csv file with layer/ add delimited text layer. In the dialog box I make sure to select that "no geometry (attribute only table) is selected. Once you hit ok, the external database must be shown in the table of contents.

3) I select the shape file right click and select properties

4)I go to the join section

5)I select the green plus sign

6)In the dialog box the join layer section must show the external database you opened prevoiuosly

7) You have to select the join and target fields

8)Once you hit Ok the join is performed, but to see the result of the join you have to open the attribute table of the shape file.

Remember that the join is temporal, so in order to make it permanent you have to select the layer in the TOC, right click, choose save as and give a new name.

Hope it helps

1
  • Thank you. I've downloaded v2.18.3 and followed the process which now runs perfectly.
    – Andrew
    Commented Feb 20, 2017 at 9:27

Your Answer

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

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