[Qgis-user] Import lines from cvs

Nicolas Cadieux nicolas.cadieux at archeotec.ca
Fri Jan 8 08:17:43 PST 2016


Hi, 
Found your problem and replied but my email might have been blocked by a spam filter.  Tell me if you don't receive that answer. Basically, you don't have the proper format.  
Cheers! 
Nicolas Cadieux M.Sc. 
Les Entreprises Archéotec inc.  
8548, rue Saint-Denis Montréal H2P 2H2 
Téléphone: 514.381.5112  Fax: 514.381.4995 
www.archeotec.ca 
On Jan 8, 2016 02:40, "Joris Hintjens [via OSGeo.org]" <ml-node+s1560n5244224h5 at n6.nabble.com> wrote: 

	Thanks, Nicolas, but already tried that: all CRS is 4326. Zoom to layer does nothing.  Should I change the E and WE, N and S to pos and neg? Op 8 jan. 2016, om 06:06 heeft Nicolas Cadieux < [hidden email] > het volgende geschreven: Hi, 
Are you sure you have no features or are they just it the wrong place?  Right Click on the layer and select zoom to layer extent.  Check your CRS and make sure you have CRS on the fly activated.  Make sure your option don't automatically assign the project or default CRS  layer as your layer does not have one yet. Nicolas Cadieux M.Sc. 
Les Entreprises Archéotec inc.  
8548, rue Saint-Denis Montréal H2P 2H2 
Téléphone: 514.381.5112  Fax: 514.381.4995 
www.archeotec.ca 
On Jan 7, 2016 16:18, "Joris Hintjens [via OSGeo.org ]	" <<a href="x-msg://7/user/SendEmail.jtp?type=node&amp;node=5244214&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote: <blockquote style="border-left:2px solid #cccccc;padding:0 1em" style="border-left:2px solid #cccccc;padding:0 1em">

	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 
	
	
	
	



<blockquote style="border-left:2px solid #cccccc;padding:0 1em" style="border-left:2px solid #cccccc;padding:0 1em"> Op 7 jan. 2016, om 03:08 heeft Nathan Woodrow <<a href="/user/SendEmail.jtp?type&#61;node&amp;node&#61;5244197&amp;i&#61;0">[hidden email]> 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 <<a href="/user/SendEmail.jtp?type&#61;node&amp;node&#61;5244197&amp;i&#61;1">[hidden email]> wrote: On 7 January 2016 at 07:08, Joris Hintjens <<a href="/user/SendEmail.jtp?type&#61;node&amp;node&#61;5244197&amp;i&#61;2">[hidden email]> 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 
> <a href="/user/SendEmail.jtp?type&#61;node&amp;node&#61;5244197&amp;i&#61;3">[hidden email] 
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user 
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
_______________________________________________ 
Qgis-user mailing list 
<a href="/user/SendEmail.jtp?type&#61;node&amp;node&#61;5244197&amp;i&#61;4">[hidden email] 
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user 
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 
_______________________________________________
Qgis-user mailing list
<a href="/user/SendEmail.jtp?type&#61;node&amp;node&#61;5244197&amp;i&#61;5">[hidden email]
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user  routesample.csv (3K) Download Attachment 

	
	
	
	
	
	
	
		If you reply to this email, your message will be added to the discussion below: 
		http://osgeo-org.1560.x6.nabble.com/Import-lines-from-cvs-tp5244005p5244197.html 
	
	
		To start a new topic under Quantum GIS - User, email [hidden email]  
		To unsubscribe from Quantum GIS - User, <a href="<a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro&amp;#61;unsubscribe_by_code&amp;amp;node&amp;#61;4125267&amp;amp;code&amp;#61;bmljb2xhcy5jYWRpZXV4QGFyY2hlb3RlYy5jYXw0MTI1MjY3fDYzNDQ4MjQxNg&amp;#61;&amp;#61" class="">http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro&#61;unsubscribe_by_code&amp;node&#61;4125267&amp;code&#61;bmljb2xhcy5jYWRpZXV4QGFyY2hlb3RlYy5jYXw0MTI1MjY3fDYzNDQ4MjQxNg&#61;&#61;">click here. 
		<a href="<a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro&amp;#61;macro_viewer&amp;amp;id&amp;#61;instant_html%21nabble%3Aemail.naml&amp;amp;base&amp;#61;nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;amp;breadcrumbs&amp;#61;notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" class="">http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro&#61;macro_viewer&amp;id&#61;instant_html%21nabble%3Aemail.naml&amp;base&#61;nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs&#61;notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" style="font:9px serif">NAML
	

	
	
	

View this message in context: Re: Import lines from cvs 
Sent from the Quantum GIS - User mailing list archive  at Nabble.com . _______________________________________________ Qgis-user mailing list [hidden email] List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user _______________________________________________
Qgis-user mailing list
[hidden email] 
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user 

	
	
	
	
	
	
	
		If you reply to this email, your message will be added to the discussion below: 
		http://osgeo-org.1560.x6.nabble.com/Import-lines-from-cvs-tp5244005p5244224.html 
	
	
		To start a new topic under Quantum GIS - User, email ml-node+s1560n4125267h38@n6.nabble.com 
		To unsubscribe from Quantum GIS - User, click here . 
		NAML 
	



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Import-lines-from-cvs-tp5244005p5244316.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160108/197ff4fe/attachment.html>


More information about the Qgis-user mailing list