Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a table with pairs of points. Out of that I want to create a line layer (that keeps all attributes of the table). One line for each raw from point to point. I want to calculate the length of these lines later.

A simplified example table would look like that: table

Can I make this in QGIS?

I am using QGIS 1.8.0 on a Mac 10.6.8

share|improve this question
up vote 6 down vote accepted

I just did something similar. I ended up stringing the from/to columns together in WKT format, and saving the file as a .txt which I then imported with the delimited text tool in QGIS. Select the WKT field, and it will create the lines for you.

share|improve this answer
Wow!! Thats awesome. I had to learn a few things about WKT but know it works perfectly fine. Thanks heaps! – stefan Mar 5 '13 at 17:50

I don't know exactly if this is possible with QGis 1.8 and with a MAC, but here is how i would approach this problem.

  • Create two point layers (origin and destination). Pay attention that both layers have the same attribute (line). So in your case one point-layer with the first coordinate set (From_Lat and From_Long) and the other set.
  • Merge them. Now you should have one big point layer with your source and destination points.
  • Use QGis Points-To-Path plugin or the Sextante SAGA module "Convert Points to lines" to create lines out of your points. Seperate the lines with the attribute you specified in your "line" column.

Thats it. Its probably even easier to create the lines with a R script or with other tools.

share|improve this answer
Hey, thanks for your answer, but I tried the other approach first. Thanks anyway. – stefan Mar 5 '13 at 17:51

There is an updated tool / plugin now in QGIS called Points 2 Paths

enter image description here

share|improve this answer

Your Answer


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.