Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a CSV file which has postcode data in a field, but it is non-spatial e.g. no Easting and Northing.

I have a shapefile with postcode in a field and some additional data.

I want to join the CSV with the shapefile based on attributes (postcode fields). I know I can do this in ArcMap, but how can I achieve the same thing in QGIS?

share|improve this question
    
How do you do this in version 2.3.0-Master? –  Austin May 13 at 18:47

4 Answers 4

up vote 14 down vote accepted

A quick way is to use the mmqgis plugin which will join your csv file to the shapefile by postcode fields

enter image description here

share|improve this answer
3  
Hey look! There is my File Browser plugin :D –  Nathan W Feb 22 '11 at 22:41
    
Good Work Nathan - been using it lots, works well. –  Mapperz Feb 22 '11 at 22:42
1  
This is working well, just what we needed. Big thank you! –  gisuser Feb 23 '11 at 10:49
    
hi, I try to do that but I get the following error Traceback (most recent call last): File "C:/Users/Juan/.qgis/python/plugins\mmqgis\mmqgis_dialogs.py", line 65, in browse_infiles dialect = csv.Sniffer().sniff(infile.read(1024)) File "C:\PROGRA~1\QUANTU~1\apps\Python25\lib\csv.py", line 160, in sniff raise Error, "Could not determine delimiter" Error: Could not determine delimiter –  user3232 Jun 5 '11 at 23:36
    
@Carlos: Which delimiter do you use in the CSV file? –  underdark Jun 6 '11 at 8:55

The upcoming release of QGIS version 1.7 will have a join feature built into the layer properties. The speed of joins is also quite impressive.

Steps to join:

  1. Open csv via the open vector icon.
  2. Open properties tab on the layer you want to join onto (your map)
  3. Click the Join tab and press the + button
  4. Select the csv layer and the two columns that you want to join on.
  5. Hit ok in the properties dialog.

Join in QGIS

share|improve this answer
    
Nice. Adding csv files using the Add Vector layer is not intuitive though. I wish I knew this earlier. –  R.K. Mar 13 '12 at 14:27

If you load your data into MS Access, ftools will allow you to join with an MS Access table.

You start qgis plugin installer, enable 3rd party repos and ftools will become available.

then use the plugin tool by going to fTools > Data Management tools > Join Attributes

share|improve this answer
    
Thank you, I don't particularly want to use another programme to get there but I will try this if all else fails. –  gisuser Feb 23 '11 at 8:55

The fTools plugin for working with Vector data will also give you the same option to "join data on an attribute" even if it's non-spatial.

share|improve this answer
    
It only seems to use the spatial data as the target layer, in this case I would like to add the fields from the spatial layer to the csv. Thanks for the suggestion. –  gisuser Feb 23 '11 at 8:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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