[Qgis-user] Import lines from cvs

Joris Hintjens jorishin at gmail.com
Thu Jan 7 13:28:35 PST 2016


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:

see anything wrong? Let me know.

greetings,

Joris






> Op 7 jan. 2016, om 03:08 heeft Nathan Woodrow <madmanwoo at gmail.com> 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 <nyall.dawson at gmail.com <mailto:nyall.dawson at gmail.com>> wrote:
> On 7 January 2016 at 07:08, Joris Hintjens <jorishin at gmail.com <mailto:jorishin at gmail.com>> 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
> > Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user <http://lists.osgeo.org/mailman/listinfo/qgis-user>
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user <http://lists.osgeo.org/mailman/listinfo/qgis-user>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user <http://lists.osgeo.org/mailman/listinfo/qgis-user>
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user <http://lists.osgeo.org/mailman/listinfo/qgis-user>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160107/bbffdc9e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: routesample.csv
Type: text/csv
Size: 2659 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160107/bbffdc9e/attachment.csv>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160107/bbffdc9e/attachment-0001.html>


More information about the Qgis-user mailing list