1

I want to make a QGIS map of a project where schools and firms are partners for education. I have a .shp of the schools and a .shp of the firms. Both have an ID column (like school number 4 is partner of firm number 4 etc.).

Is there an easy way to draw lines between the corresponding points from the two layers? MMQGIS and HubLines does not get the results right.

2
  • Could you expand on what the results were from MMQGIS & HubLines, and what you were expecting?
    – MaryBeth
    Feb 17, 2017 at 16:01
  • Hello MaryBeth, some points worked out fine, some just didn't get any connections. The tables and values are correct, I checked it multiple times. Would you know another extension of QGIS which might work as well?
    – Matthias
    Feb 17, 2017 at 16:10

1 Answer 1

3

I would suggest you to use the RT QSpider plugin after preparing your data as follow :

  • add 2 columns for X and Y coordinates in both your shapefiles
  • join the 2 shapefiles by id (the way has no importance)
  • export your joined shapefile into csv

Then, select the csv file in the layer viewer and launch the RT QSpider tool. Select "line" as output geometry, beware of the CRS, select the coordinates of start and end point that you just created and you're done.

2

Your Answer

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

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