"Add delimited textlayer" to get coordinates for QGIS??

Help on using the current version of QGIS

"Add delimited textlayer" to get coordinates for QGIS??

Postby ososo on Sun Nov 01, 2009 5:53 pm

I´ve made several trials to get "Add delimited text layer" to function. I can read data into that program but I can´t make it work when I try to read the file into QGIS!!

I would like to show the screenshot here to show how the data looks in "Add delimited text layer", before reading the data into QGIS. But how can I show screenshots here in the forum?

What is wrong and what can I do to change it?
ososo
Apprentice
Apprentice
 
Posts: 20
Joined: Sun Nov 01, 2009 3:29 pm

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby underdark on Sun Nov 01, 2009 6:02 pm

Hi ososo!
Just post the content of the text file you want to import here. There has to be some error in the file.
User avatar
underdark
QGIS Master
QGIS Master
 
Posts: 216
Joined: Tue Jan 22, 2008 10:39 am

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby ososo on Mon Nov 02, 2009 9:29 am

Hey Underdark!
Thank you for your answer! I tried to attach the file but I got the answer "The extension txt is not allowed".
Do you know how I can post it?
ososo
Apprentice
Apprentice
 
Posts: 20
Joined: Sun Nov 01, 2009 3:29 pm

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby GuZzO on Mon Nov 02, 2009 10:31 am

If the text file is not that big you can just copy and paste the content in this thread.
If it's too big copy and paste the header and the 10th first lines, we'll check if the syntax is correct.

GuZzO
GuZzO
Expert
Expert
 
Posts: 89
Joined: Fri Jun 05, 2009 12:44 pm
Location: Bailleul - 59

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby ososo on Mon Nov 02, 2009 2:14 pm

Hey!
This is the first part of the textfile (in Notepad), which won´t function when I try to import in QGIS.

SJÖ Y-koord X-koord Reg Area Depth AboveSL HighSL RiverS Munic SjöID bg_lat bg_long
Alkvettern 6587900 1421510 T 11,09 19 112,3 175 Gullspångsälven Karlskoga 3 59.39537 14.44053
Allgjuttern 6424890 1517240 H 0,17 32 126,4 138 Botorpsströmmen Västervik 4 0 0
Allgunnen 6317060 1514190 H 13,1 15,6 84,7 88 Alsterån Högsby 5 57.063171 15.99603
Alsen 6527450 1449110 T 5,9 16,5 88,5 150 Motala ström Askersund 6 48.630741 -98.704262
Alstern (Filipstad) 6623220 1393390 S 9,5 64 158 185 Gullspångsälven Filipstad 7 0 0
Alstern (Karlstad) 6592360 1374810 S 5,9 14 52 180 Alsterälven Karlstad 8 0 0
Anen 6410210 1514210 H 3,58 17 123 129 Botorpsströmmen Västervik 11 0 0
Anten 6434990 1301580 O 18,37 27 66,3 Säveån Alingsås 333 52.63583 7.7489
Aspen (S-län) 6580680 1322440 S 3,4 14 70 Göta älv Säffle 266 0 0

Hope this will help!
ososo
Apprentice
Apprentice
 
Posts: 20
Joined: Sun Nov 01, 2009 3:29 pm

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby GuZzO on Mon Nov 02, 2009 2:17 pm

there's no ";" separator.... you use space as separator and it's not a good choice!!
you should have ";" between every fields

the second bad point is you use both "," or "." for decimal separator.
i test with both and it works but pay attention to this because some softwares could bug...


following syntax should be ok:

SJÖ;Y-koord;X-koord;Reg;Area;Depth;AboveSL;HighSL;RiverS;Munic;SjöID;bg_lat;bg_long
Alkvettern;6587900;1421510;T;11,09;19;112,3;175;Gullspångsälven;Karlskoga;3;59.39537;14.44053
Allgjuttern;6424890;1517240;H;0,17;32;126,4;138;Botorpsströmmen;Västervik;4;0;0
Allgunnen;6317060;1514190;H;13,1;15,6;84,7;88;Alsterån;Högsby;5;57.063171;15.99603
Alsen;6527450;1449110;T;5,9;16,5;88,5;150;Motala ström;Askersund;6;48.630741;-98.704262
Alstern (Filipstad);6623220;1393390;S;9,5;64;158;185;Gullspångsälven;Filipstad;7;0;0
Alstern (Karlstad);6592360;1374810;S;5,9;14;52;180;Alsterälven;Karlstad;8;0;0
Anen;6410210;1514210;H;3,58;17;123;129;Botorpsströmmen;Västervik;11;0;0
Anten;6434990;1301580;O;18,37;27;66,3;;Säveån;Alingsås;333;52.63583;7.7489
Aspen (S-län);6580680;1322440;S;3,4;14;70;;Göta älv ;Säffle;266;0;0


Use excel to convert your text file in csv but you'll have to correct manually some rows...
like Alstern (Filipstad) which is one field but excel will separate" Alstern" and "(Filipstad)" because there's a space between them!!!
same problem for Motala ström and Göta älv
GuZzO
Expert
Expert
 
Posts: 89
Joined: Fri Jun 05, 2009 12:44 pm
Location: Bailleul - 59

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby ososo on Mon Nov 02, 2009 4:42 pm

Thank you GuZzO for your advice! I´m going to test it now.
ososo
Apprentice
Apprentice
 
Posts: 20
Joined: Sun Nov 01, 2009 3:29 pm

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby ososo on Mon Nov 02, 2009 5:20 pm

How can I save the file with ; (semicolon) as separators when I start with a tab-delimited text-file. If I should start
with a comma-delimited file I get problems with the decimals which are just commas. How to do?
ososo
Apprentice
Apprentice
 
Posts: 20
Joined: Sun Nov 01, 2009 3:29 pm

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby GuZzO on Mon Nov 02, 2009 6:46 pm

In excel,"save as..." and choose CSV (separator: ; ) *.csv

but pay attention to the number of column! you should have 13 fields: SJÖ;Y-koord;X-koord;Reg;Area;Depth;AboveSL;HighSL;RiverS;Munic;SjöID;bg_lat;bg_long
Check for no value in the 14th, 15th and following columns!!
GuZzO
Expert
Expert
 
Posts: 89
Joined: Fri Jun 05, 2009 12:44 pm
Location: Bailleul - 59

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby ososo on Mon Nov 02, 2009 7:05 pm

In Excel I have no alternative as CSV (semicolon). I have only CSV (Comma delimited), CSV (Macintosh), CSV (MS-DOS).
ososo
Apprentice
Apprentice
 
Posts: 20
Joined: Sun Nov 01, 2009 3:29 pm

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby GuZzO on Mon Nov 02, 2009 8:28 pm

The "CSV (Comma delimited)" is a ; or , separator?
if you use "." as decimal separator for all the fields then you can use "," as field separator, or the contrary.

Access or Open office are also able to convert your tab separator text file in CSV.
GuZzO
Expert
Expert
 
Posts: 89
Joined: Fri Jun 05, 2009 12:44 pm
Location: Bailleul - 59

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby ososo on Mon Nov 02, 2009 9:41 pm

Thanks a lot GuZzo!
It function very well now, but two things. When I use the Info-arrow to see specifications about an object on the map I
get for example name and coordinates twice in the info-view-rectangle!! How can I change that?
Another problem is that I happened to get fullscreen of QGIS and I can´t change it back to halfscreen so I can see for
example the activity-field.
Any way many thanks for your help!!
ososo
Apprentice
Apprentice
 
Posts: 20
Joined: Sun Nov 01, 2009 3:29 pm

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby GuZzO on Mon Nov 02, 2009 10:29 pm

ososo wrote:Thanks a lot GuZzo!

You're welcome! ^^

It function very well now, but two things. When I use the Info-arrow to see specifications about an object on the map I
get for example name and coordinates twice in the info-view-rectangle!! How can I change that?

i don't really get you there.... could you post a screenshot please?
In the info-view-rectangle (screen1), you can change the first value displayed (the blue line on screen1).

Sans titre.jpg
Sans titre.jpg (60.81 KiB) Viewed 449 times


To do this, right clic on the layer and select "Properties" (screen2) and change the combobox value "Diplay field".

Sans titre2.jpg
Sans titre2.jpg (60.97 KiB) Viewed 446 times


Another problem is that I happened to get fullscreen of QGIS and I can´t change it back to halfscreen so I can see for
example the activity-field.
Any way many thanks for your help!!

Right clic on the menu toolbar and tick the box "Layers"
GuZzO
Expert
Expert
 
Posts: 89
Joined: Fri Jun 05, 2009 12:44 pm
Location: Bailleul - 59

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby ososo on Tue Nov 03, 2009 9:11 am

I´ve taken screenshots, but I can´t attach them into the message. How is the routine to make that?
ososo
Apprentice
Apprentice
 
Posts: 20
Joined: Sun Nov 01, 2009 3:29 pm

Re: "Add delimited textlayer" to get coordinates for QGIS??

Postby GuZzO on Tue Nov 03, 2009 9:24 am

When you write a message, there's 2 tabs under the text field:

* Options
* Upload attachment

choose "Upload attachement" and then "Browse" and "Add the file"
GuZzO
Expert
Expert
 
Posts: 89
Joined: Fri Jun 05, 2009 12:44 pm
Location: Bailleul - 59

Next

Return to Current Version

Who is online

Users browsing this forum: 0422107, Google [Bot], Jhelebrant, MSN [Bot] and 3 guests