0

I have a csv file containing information for loads of lines (dates, road names, condition information, etc etc) but which have no geographical information (other than the association of road name)

Is it possible to load the file in QGIS, and draw the polyline which refers to each row of data, rather than have to re-enter the data for each polyline drawn?

  • Do you want to draw the lines manually or do you have some kind of coordinate data? – underdark Jul 26 '13 at 10:23
0

If I have understood your question, you have some line data in a GIS format and a csv file with the attributes in it and both the GIS data and the CSV data have a common attribute of 'road name'.

If my understanding is correct then you simply need to do a table join. Load your lines data and the CSV into QGIS (in this case load the CSV in exactly the same way as your lines to ensure it comes in as a table). Double click on your lines layer to bring up the properties dialog box and select 'Joins'. Make a new join using your CSV table and select the road name field in the source and target tables.

There is also a plugin to help you. If you have MMQGIS installed, go MMQGIS->Combine->Attribute Join From CSV File.

  • Apologies if I havn't explained correctly. At the minute I just have a raster map and an OS Vector map. I do not have any geo data for the roads. The only way I can work out where the data goes is by looking at the street name and identifying it on the map. The 'slow' option would be to draw a line and start typing all the attributes including road names in manually. This would take a bit of time and is prone to errors. I'm wondering if QGIS can loop through each record, I could identify the road name and draw the line which would then have those attributes. – gN87 Jul 26 '13 at 10:27
  • You could digitize your lines and attribute them with the road name as you draw them. then use the method in my answer to join the tables - there should be no need to type all the data in a second time. Since you are talking about OS data, a lot of this is contained in OSM (all the free stuff anyway). A quicker option which may prove acceptable would be to select the roads data from OSM for your area and then all you need to do is ensure they are named correctly for the table join - and this will save you even having to digitize the lines. – MappaGnosis Jul 26 '13 at 11:10
  • Thanks Mappa, your first option is probably the easiest to carry out. Half of the roads are proposed, some aren't named on the OS mapping etc, so the second option won't work although would be quite quick if it did. Many thanks. – gN87 Jul 26 '13 at 12:15

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.