Thanks Nathan,

short but good proposition. 

You encouraged me to finally have a look at that WKT button in the “import cvs” menu. 
But… No succes. Tried DMS and D,ddd format, but nothing happens. The layer imports, arrears in the layer list, property table of that layer looks fine, but no features appear on the map. IF you have nothing more interesting to do,  and want to give it a try: 
Here is a sample of my layer:
"ROUTE","Count - ROUTE","GEOMDMS","GEOMDEC","Xdep","Ydep","Xarr","Yarr"
"AT888_BEANR",1,"LINESTRING (015°31'E 48°12'N, 004°25'E 51°13'N)","LINESTRING (015.51E 48.20N, 004.41E 51.21N)","015°31'E","48°12'N","004°25'E","51°13'N"
"AT888_BEGNE",1,"LINESTRING (015°31'E 48°12'N, 003°43'E 51°03'N)","LINESTRING (015.51E 48.20N, 003.71E 51.5N)","015°31'E","48°12'N","003°43'E","51°03'N"
"ATKRE_BEANR",1,"LINESTRING (015°10'E 48°13'N, 004°25'E 51°13'N)","LINESTRING (015.16E 48.21N, 004.41E 51.21N)","015°10'E","48°13'N","004°25'E","51°13'N"
"ATLNZ_BEAAL",1,"LINESTRING (013°35'E 48°43'N, 003°27'E 51°05'N)","LINESTRING (013.58E 48.71N, 003.45E 51.8N)","013°35'E","48°43'N","003°27'E","51°05'N"
"ATLNZ_BEANR",113,"LINESTRING (013°35'E 48°43'N, 004°25'E 51°13'N)","LINESTRING (013.58E 48.71N, 004.41E 51.21N)","013°35'E","48°43'N","004°25'E","51°13'N"
"ATLNZ_BEGNE",1,"LINESTRING (013°35'E 48°43'N, 003°43'E 51°03'N)","LINESTRING (013.58E 48.71N, 003.71E 51.5N)","013°35'E","48°43'N","003°43'E","51°03'N"
"ATLNZ_BEWJG",2,"LINESTRING (013°35'E 48°43'N, 004°32'E 51°14'N)","LINESTRING (013.58E 48.71N, 004.53E 51.23N)","013°35'E","48°43'N","004°32'E","51°14'N"
"ATLNZ_BEZEE",2,"LINESTRING (013°35'E 48°43'N, 003°12'E 51°20'N)","LINESTRING (013.58E 48.71N, 003.20E 51.33N)","013°35'E","48°43'N","003°12'E","51°20'N"
"ATOSH_BEANR",2,"LINESTRING (014°11'E 48°20'N, 004°25'E 51°13'N)","LINESTRING (014.18E 48.33N, 004.41E 51.21N)","014°11'E","48°20'N","004°25'E","51°13'N"
"ATVIE_BEANR",2,"LINESTRING (014°03'E 46°37'N, 004°25'E 51°13'N)","LINESTRING (014.5E 46.61N, 004.41E 51.21N)","014°03'E","46°37'N","004°25'E","51°13'N"
"BEAAB_BEAAL",22,"LINESTRING (004°02'E 50°56'N, 003°27'E 51°05'N)","LINESTRING (004.3E 50.93N, 003.45E 51.8N)","004°02'E","50°56'N","003°27'E","51°05'N"
"BEAAB_BEANR",130,"LINESTRING (004°02'E 50°56'N, 004°25'E 51°13'N)","LINESTRING (004.3E 50.93N, 004.41E 51.21N)","004°02'E","50°56'N","004°25'E","51°13'N"
"BEAAB_BEBGS",5,"LINESTRING (004°02'E 50°56'N, 003°14'E 51°13'N)","LINESTRING (004.3E 50.93N, 003.23E 51.21N)","004°02'E","50°56'N","003°14'E","51°13'N"
"BEAAB_BEEVM",2,"LINESTRING (004°02'E 50°56'N, 003°42'E 51°07'N)","LINESTRING (004.3E 50.93N, 003.70E 51.11N)","004°02'E","50°56'N","003°42'E","51°07'N"
"BEAAB_BEGNE",60,"LINESTRING (004°02'E 50°56'N, 003°43'E 51°03'N)","LINESTRING (004.3E 50.93N, 003.71E 51.5N)","004°02'E","50°56'N","003°43'E","51°03'N"
"BEAAB_BEMRK",35,"LINESTRING (004°02'E 50°56'N, 004°27'E 51°15'N)","LINESTRING (004.3E 50.93N, 004.45E 51.25N)","004°02'E","50°56'N","004°27'E","51°15'N"
see anything wrong? Let me know.

greetings,

Joris









Op 7 jan. 2016, om 03:08 heeft Nathan Woodrow <[email protected]> het volgende geschreven:

Or use excel to make a WKT column and import that.

Nathan


On Thu, 7 Jan 2016 11:48 am Nyall Dawson <[email protected]> wrote:
On 7 January 2016 at 07:08, Joris Hintjens <[email protected]> wrote:
> Hello,
> I’m lost.
> I have a list of movements. A table with (among others) a column “FROM”  and a column “TO” (both containing coordinates)
>
> How can I import this in QGIS so that I have a bunch of lines going from FROM to TO?
>

This is relatively straightforward in QGIS master:

- import your CSV file
- right click the CSV layer, and choose "Save as"
- change format to "ESRI Shapefile". Choose the correct CRS for your
coordinates.
- expand out the "Geometry" group and change "Geometry type" from
"Automatic" to "LineString"
- click OK, the new LineString shapefile (with all null geometries)
will be added to the project
- now, you need to create the geometries. This is done through the
field calculator.
- tick "update existing field"
- change the field to "<geometry>"
- enter the _expression_:
'make_line(make_point("x1","y1"),make_point("x2","y2"))' (but replace
x1, y1, ... with the correct columns names from your original CSV
file)
- click OK. Done!

Nyall


> thanks for your comments
>
> Joris
>
> _______________________________________________
> Qgis-user mailing list
> [email protected]
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

_______________________________________________
Qgis-user mailing list
[email protected]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to