<p dir="ltr">Or use excel to make a WKT column and import that.</p>
<p dir="ltr">Nathan</p>
<br><div class="gmail_quote"><div dir="ltr">On Thu, 7 Jan 2016 11:48 am Nyall Dawson <<a href="mailto:nyall.dawson@gmail.com">nyall.dawson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 7 January 2016 at 07:08, Joris Hintjens <<a href="mailto:jorishin@gmail.com" target="_blank">jorishin@gmail.com</a>> wrote:<br>
> Hello,<br>
> I’m lost.<br>
> I have a list of movements. A table with (among others) a column “FROM”  and a column “TO” (both containing coordinates)<br>
><br>
> How can I import this in QGIS so that I have a bunch of lines going from FROM to TO?<br>
><br>
<br>
This is relatively straightforward in QGIS master:<br>
<br>
- import your CSV file<br>
- right click the CSV layer, and choose "Save as"<br>
- change format to "ESRI Shapefile". Choose the correct CRS for your<br>
coordinates.<br>
- expand out the "Geometry" group and change "Geometry type" from<br>
"Automatic" to "LineString"<br>
- click OK, the new LineString shapefile (with all null geometries)<br>
will be added to the project<br>
- now, you need to create the geometries. This is done through the<br>
field calculator.<br>
- tick "update existing field"<br>
- change the field to "<geometry>"<br>
- enter the expression:<br>
'make_line(make_point("x1","y1"),make_point("x2","y2"))' (but replace<br>
x1, y1, ... with the correct columns names from your original CSV<br>
file)<br>
- click OK. Done!<br>
<br>
Nyall<br>
<br>
<br>
> thanks for your comments<br>
><br>
> Joris<br>
><br>
> _______________________________________________<br>
> Qgis-user mailing list<br>
> <a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
> List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
> Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div>