Re: [Qgis-user] Import lines from cvs

2016-01-08 Thread Joris Hintjens
Thanks again for your help, Nicolas.

In my sample, if you look closer, you’ll see that I tried both formats. DMS and 
decimal degrees. (see the two “LINESTRING”s headers) Both no result.
Maybe the problem is that the comma’s from the cvs conflict with the commas 
from the nodes separator in WKT?
I also see that you have no East West, North ofSouth markings. So I should 
convert to neg for West and South? 

Joris



> Op 8 jan. 2016, om 17:17 heeft Nicolas Cadieux  
> het volgende geschreven:
> 
> Hi,
> I looked at your file and that is the problem.
> 
> 
> "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"
> 
> I don't think qgis will understand "015°31'E". Change that to Decimals 
> Degrees.  Then the format must be as follow...
> 
> This will work
> 
> id; ROUTE;Count_ROUTE;wkt;data
> 1;AT888_BEANR;LINESTRING(015.5 48.5 , 004.5 51.5);more data
> 
> 
> 
> Notice: 1 linestring per line of data, ";" as a separator between field use 
> DD, space between x and y and, points for decimal,  commas between points in 
> the WKT column ";LINESTRING(015.5 48.5 , 004.5 51.5);".  (I use dummy x and y)
> 
> More info:  
> http://gis.stackexchange.com/questions/34342/whats-the-proper-format-for-wkt-linestrings-when-importing-into-qgis
>  
> 
> https://en.wikipedia.org/wiki/Well-known_text 
> 
> 
> Good luck
> Nicolas

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Import lines from cvs

2016-01-08 Thread Nicolas Cadieux
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]" 
 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 ]  " <[hidden email]> wrote: 
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 <[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 <[hidden email]> wrote: On 7 January 2016 at 07:08, Joris Hintjens <[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 "" - 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 > [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 ___ 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 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 -

Re: [Qgis-user] Import lines from cvs

2016-01-08 Thread Matthias Kuhn


On 01/08/2016 12:07 PM, Fernando M. Roxo da Motta wrote:
> On Fri, 8 Jan 2016 09:07:48 +0100, Matthias Kuhn 
> wrote:
>
>   Hi all,
>
>
>   Sorry to be nosy,  I was trying that myself on Qgis 2.12 and couldn't
> find the option during save.   The I notice the initial statement:
>
>"This is relatively straightforward in QGIS master:"
>
>   So I got that those options are only available in the master
> development version.Did I got that right?
Correct, master (development version) -> to become 2.14

Best regards,
Matthias

>
>
>   Regards.
>
>
>> Hi Joris
>>
>> On 01/07/2016 10:14 PM, Joris Hintjens wrote:
>>> Thanks Nyall,
>>>
>>> I try to understand your procedure, but…:
>>>
>>> line3: “save as…”: Before doing that, I already need a geometry
>>> defined, a proces you describe later i the process. I don’t get it.
>> Note the "with all null geometries" comment in 5. This will just
>> prepare an empty container which will be filled later.
>>
>>> line 4: "- expand out the "Geometry” group…”  This is an option
>>> from the “load csv layer”, not from “save layer as (shape)”
>> ... I see it as well in "save as"
>>
>>> line 8: change field to : which field?  I lost you there
>>> completely. Sorry.
>> Where you should specify a field name
>>
>>>
>>>
 Op 7 jan. 2016, om 02:47 heeft Nyall Dawson
  het volgende geschreven:

 On 7 January 2016 at 07:08, Joris Hintjens 
 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:

 1- import your CSV file
 2- right click the CSV layer, and choose "Save as"
 3- change format to "ESRI Shapefile". Choose the correct CRS for
 your coordinates.
 4- expand out the "Geometry" group and change "Geometry type" from
 "Automatic" to "LineString"
 5- click OK, the new LineString shapefile (with all null
 geometries) will be added to the project
 6- now, you need to create the geometries. This is done through the
 field calculator.
 7- tick "update existing field"
 8- change the field to ""
 9- 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)
 10- click OK. Done!

 Nyall


> thanks for your comments
>
> Joris
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>> ___
>>> Qgis-user mailing list
>>> Qgis-user@lists.osgeo.org
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
>
>
>
>
>
>
>   Roxo
>

-- 
Matthias Kuhn
OPENGIS.ch - https://www.opengis.ch
Spatial • (Q)GIS • PostGIS • Open Source

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Import lines from cvs

2016-01-08 Thread Fernando M. Roxo da Motta
On Fri, 8 Jan 2016 09:07:48 +0100, Matthias Kuhn 
wrote:

  Hi all,


  Sorry to be nosy,  I was trying that myself on Qgis 2.12 and couldn't
find the option during save.   The I notice the initial statement:

   "This is relatively straightforward in QGIS master:"

  So I got that those options are only available in the master
development version.Did I got that right?


  Regards.


> Hi Joris
> 
> On 01/07/2016 10:14 PM, Joris Hintjens wrote:
> > Thanks Nyall,
> > 
> > I try to understand your procedure, but…:
> > 
> > line3: “save as…”: Before doing that, I already need a geometry
> > defined, a proces you describe later i the process. I don’t get it.
> 
> Note the "with all null geometries" comment in 5. This will just
> prepare an empty container which will be filled later.
> 
> > line 4: "- expand out the "Geometry” group…”  This is an option
> > from the “load csv layer”, not from “save layer as (shape)”
> 
> ... I see it as well in "save as"
> 
> > line 8: change field to : which field?  I lost you there
> > completely. Sorry.
> 
> Where you should specify a field name
> 
> > 
> > 
> > 
> >> Op 7 jan. 2016, om 02:47 heeft Nyall Dawson
> >>  het volgende geschreven:
> >>
> >> On 7 January 2016 at 07:08, Joris Hintjens 
> >> 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:
> >>
> >> 1- import your CSV file
> >> 2- right click the CSV layer, and choose "Save as"
> >> 3- change format to "ESRI Shapefile". Choose the correct CRS for
> >> your coordinates.
> >> 4- expand out the "Geometry" group and change "Geometry type" from
> >> "Automatic" to "LineString"
> >> 5- click OK, the new LineString shapefile (with all null
> >> geometries) will be added to the project
> >> 6- now, you need to create the geometries. This is done through the
> >> field calculator.
> >> 7- tick "update existing field"
> >> 8- change the field to ""
> >> 9- 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)
> >> 10- click OK. Done!
> >>
> >> Nyall
> >>
> >>
> >>> thanks for your comments
> >>>
> >>> Joris
> >>>
> >>> ___
> >>> Qgis-user mailing list
> >>> Qgis-user@lists.osgeo.org
> >>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> >>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > 
> > ___
> > Qgis-user mailing list
> > Qgis-user@lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user







  Roxo

-- 
 Non luctari, ludare ---+ WYSIWYG
Fernando M. Roxo da Motta   | Editor?
Except where explicitly stated I speak on my own behalf.|  VI !!
  ( Usuário Linux registrado #39505 )   | I see text,
 Quis custodiet ipsos custodes?-+ I get text!
 
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Import lines from cvs

2016-01-08 Thread Matthias Kuhn
Hi Joris

On 01/07/2016 10:14 PM, Joris Hintjens wrote:
> Thanks Nyall,
> 
> I try to understand your procedure, but…:
> 
> line3: “save as…”: Before doing that, I already need a geometry defined, a 
> proces you describe later i the process. I don’t get it.

Note the "with all null geometries" comment in 5. This will just prepare
an empty container which will be filled later.

> line 4: "- expand out the "Geometry” group…”  This is an option from the 
> “load csv layer”, not from “save layer as (shape)”

... I see it as well in "save as"

> line 8: change field to : which field?  I lost you there completely. 
> Sorry.

Where you should specify a field name

> 
> 
> 
>> Op 7 jan. 2016, om 02:47 heeft Nyall Dawson  het 
>> volgende geschreven:
>>
>> On 7 January 2016 at 07:08, Joris Hintjens  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:
>>
>> 1- import your CSV file
>> 2- right click the CSV layer, and choose "Save as"
>> 3- change format to "ESRI Shapefile". Choose the correct CRS for your
>> coordinates.
>> 4- expand out the "Geometry" group and change "Geometry type" from
>> "Automatic" to "LineString"
>> 5- click OK, the new LineString shapefile (with all null geometries)
>> will be added to the project
>> 6- now, you need to create the geometries. This is done through the
>> field calculator.
>> 7- tick "update existing field"
>> 8- change the field to ""
>> 9- 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)
>> 10- click OK. Done!
>>
>> Nyall
>>
>>
>>> thanks for your comments
>>>
>>> Joris
>>>
>>> ___
>>> Qgis-user mailing list
>>> Qgis-user@lists.osgeo.org
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> 
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Import lines from cvs

2016-01-07 Thread Joris Hintjens
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  
> 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] " <[hidden email] 
> > wrote:
> 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 < href="/user/SendEmail.jtp?type=node&node=5244197&i=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 < href="/user/SendEmail.jtp?type=node&node=5244197&i=1">[hidden
>  email]> wrote:
> On 7 January 2016 at 07:08, Joris Hintjens < href="/user/SendEmail.jtp?type=node&node=5244197&i=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 ""
> - 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
> >  > href="/user/SendEmail.jtp?type=node&node=5244197&i=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
>  href="/user/SendEmail.jtp?type=node&node=5244197&i=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 
>  href="/user/SendEmail.jtp?type=node&node=5244197&i=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 
> ml-node+s1560n4125267...@n6.nabble.com 
> To unsubscribe from Quantum GIS - User,  href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4125267&code=bmljb2xhcy5jYWRpZXV4QGFyY2hlb3RlYy5jYXw0MTI1MjY3fDYzNDQ4MjQxNg==";>click
>  here.
>  href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.t

Re: [Qgis-user] Import lines from cvs

2016-01-07 Thread Nicolas Cadieux
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]  " 
 wrote: 

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 < [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 < [hidden email] > wrote: 
On 7 January 2016 at 07:08, Joris Hintjens < [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 "" - 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 > [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 ___ 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 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 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-tp5244005p5244214.html Sent from the Quantum GIS - User mailing list archive at Nabble.com.___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Import lines from cvs

2016-01-07 Thread Joris Hintjens
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  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  wrote:On 7 January 2016 at 07:08, Joris Hintjens  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 ""
- 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@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http

Re: [Qgis-user] Import lines from cvs

2016-01-07 Thread Joris Hintjens
Thanks Nyall,

I try to understand your procedure, but…:

line3: “save as…”: Before doing that, I already need a geometry defined, a 
proces you describe later i the process. I don’t get it.
line 4: "- expand out the "Geometry” group…”  This is an option from the “load 
csv layer”, not from “save layer as (shape)”
line 8: change field to : which field?  I lost you there completely. 
Sorry.



> Op 7 jan. 2016, om 02:47 heeft Nyall Dawson  het 
> volgende geschreven:
> 
> On 7 January 2016 at 07:08, Joris Hintjens  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:
> 
> 1- import your CSV file
> 2- right click the CSV layer, and choose "Save as"
> 3- change format to "ESRI Shapefile". Choose the correct CRS for your
> coordinates.
> 4- expand out the "Geometry" group and change "Geometry type" from
> "Automatic" to "LineString"
> 5- click OK, the new LineString shapefile (with all null geometries)
> will be added to the project
> 6- now, you need to create the geometries. This is done through the
> field calculator.
> 7- tick "update existing field"
> 8- change the field to ""
> 9- 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)
> 10- click OK. Done!
> 
> Nyall
> 
> 
>> thanks for your comments
>> 
>> Joris
>> 
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Import lines from cvs

2016-01-07 Thread Joris Hintjens
Thanks Nicolas,

But…
Trying to avoid python, as I am illiterate in that field (for now)

For the plugins P2one etc, in order to use that, I need separate lines for 
“From” and “To” points, but I can create them. That will be my next guess, 
after trying the other proposed solutions.


> Op 6 jan. 2016, om 21:25 heeft Nicolas Cadieux  
> het volgende geschreven:
> 
> Hi,
> I think you will need to use the python console to do the job.  I have no 
> direct  experience but if you look in the pyqgis developer cookbook and look 
> for "Geometry Construction" you will find a reference to "gLine".
> 
> With that, you can create a line with two or more points.
> 
> Before doing that, look at the plugin (activate experimental plugin and 
> Search for " line".  There seems to be po plugins that can do it like 
> PointConnector or Points2One...
> Good luck.
> 
> 
> 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 6, 2016 2:58 PM, "Joris Hintjens [via OSGeo.org]   " <[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? 
> 
> thanks for your comments 
> 
> Joris 
> 
> ___ 
> Qgis-user mailing list 
>  href="/user/SendEmail.jtp?type=node&node=5244005&i=0">[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-tp5244005.html 
> 
> To start a new topic under Quantum GIS - User, email 
> ml-node+s1560n4125267...@n6.nabble.com 
> To unsubscribe from Quantum GIS - User,  href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4125267&code=bmljb2xhcy5jYWRpZXV4QGFyY2hlb3RlYy5jYXw0MTI1MjY3fDYzNDQ4MjQxNg==";>click
>  here.
>  href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=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
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Import lines from cvs

2016-01-06 Thread Nicolas Cadieux

Well, 
Updating geometries from columns Try doing that with MapInfo 
Cool tips! 
:) 
Nicolas Cadieux M.Sc. 
On Jan 6, 2016 20:58, "Nathan Woodrow [via OSGeo.org]  " 
 wrote: 

Or use excel to make a WKT column and import that. 
Nathan 
On Thu, 7 Jan 2016 11:48 am Nyall Dawson < [hidden email] > wrote: 
On 7 January 2016 at 07:08, Joris Hintjens < [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 "" - 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 > [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 ___ 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-tp5244005p5244032.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-tp5244005p5244038.html Sent from the Quantum GIS - User mailing list archive at Nabble.com.___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Import lines from cvs

2016-01-06 Thread Nathan Woodrow
Or use excel to make a WKT column and import that.

Nathan

On Thu, 7 Jan 2016 11:48 am Nyall Dawson  wrote:

> On 7 January 2016 at 07:08, Joris Hintjens  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 ""
> - 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@lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Import lines from cvs

2016-01-06 Thread Nyall Dawson
On 7 January 2016 at 07:08, Joris Hintjens  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 ""
- 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@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] Import lines from cvs

2016-01-06 Thread Nicolas Cadieux
Hi, 
I think you will need to use the python console to do the job.  I have no 
direct  experience but if you look in the pyqgis developer cookbook and 
look for "Geometry Construction" you will find a reference to "gLine". 
With that, you can create a line with two or more points. 
Before doing that, look at the plugin (activate experimental plugin and Search 
for " line".  There seems to be po plugins that can do it like 
PointConnector or Points2One... 
Good luck. 
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 6, 2016 2:58 PM, "Joris Hintjens [via OSGeo.org]" 
 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?
thanks for your comments
Joris
___
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-tp5244005.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-tp5244005p5244012.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Import lines from cvs

2016-01-06 Thread Joris Hintjens
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)
DON’T WORRY ABOUT SPLITTING THE COLUMNS IN 2 SETS OF X AND Y , THAT’S NOT MY 
PROBLEM


How can I import this in QGIS so that I have a bunch of lines going from FROM 
to TO?

thanks for your comments

Joris

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user

[Qgis-user] Import lines from cvs

2016-01-06 Thread Joris Hintjens
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?

thanks for your comments

Joris

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user