1

I am using QGIS 2.18.23 on Windows 10. I keep trying to link a csv file (Pits6) to a shp file (Pits). It seems to work but when I click on one of the pits I get none of the information in the csv file. It worked once but when I added data to the csv file and re-imported it it stopped working.

I created a Vector Layer called Pits and then drew about 20 separate pits giving them IDs of 1, 2 3 etc. I made an Excel spreadsheet with a first column 'Pit no.' going from 1, 2, 3 etc; there are four other columns with data I want to display. The spreadsheet I saved as a csv file (trying both normal and MS -DOS types). Imported the csv file, using icon to the left. then highlighted the file, right clicked, then Properties then Joins. Clicked the green + sign, browsed to Pits, then Join Field on ID, Target Field to Pit Number, then Apply and OK. Then when I look at the plan and use Identify Features to click on a pit, it just returns the Pit No. and none of the data that is in the spread sheet (and csv file).

How do I add screen shots to this box?

3
  • 4
    Please add more information. With such scarce infromation, it is difficult to find out what your problem is without just guessing. So please provide all relevant infromation about your data, what you exactly did, where you'e stuck etc. Screenshots are always a good way to make others understand what you are doing.
    – Babel
    Commented Jan 10, 2021 at 18:17
  • Add screenshot: in edit mode, click the picture symbol to choose a saved image file, see screenshot: i.sstatic.net/hVvNK.png or simply paste (ctrl-V on Windows) an image from the you clipboard when in edit mode.
    – Babel
    Commented Jan 11, 2021 at 8:41
  • 2
    Rather than adding an acceptance of the answer in your question, please use the 'Tick' button next to the answer that helped you out. Feel free to add a comment to the answer if you have something else key to the solution. This will help other users easily find the correct solution.
    – JClarkson
    Commented Jan 11, 2021 at 11:16

1 Answer 1

3

It sounds like you're applying the join the wrong way around. You need to create the join within the properties of your shapefile layer, not the CSV.

Then remember that if you want this information written to the shapefile (rather than a temporary connection just within that QGIS project), you will need to export and save the shapefile.

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.