I have a CSV file where one line looks like this:
Duration, user, lat-start, long-start, lat-end, long-end
298, Casual,38.9101,-77.0444,38.91554,-77.03818
Each row in the CSV has two points and I need to draw a line between those two points for each row.
How can I do this using QGIS 1.8.0?
I have tried using the delimited text file plug-in, but it just draws points and has no line option from what I can see.
Best Answer
With a bit of text processing (maybe in Excel), you can bring your data into this form:
which can be interpreted by QGIS as well known text (WKT) using
Add delimited text layer
.Note that you need blanks and comma as delimiters for lon&lat values and linestring members, and lon values have to be first. In the dialogue, only check semicolon as column delimiter.
Applying
EPSG:4326
as CRS , you end up at New Hampshire Avenue Nordwest in Washington DC.EDIT
this one works from your second example: