Re: [Qgis-user] problem reading csv file (numbers read as strings)

2013-10-22 Thread Zirneklitis

CSVT fole solves the issue.

Thank You, Ian.kirk-ellis

Best Regards,
Karlis

matteo wrote:

You just drag and drop the csv in the map canvas and this is the result??
..
String(12),Integer(7),Integer(7)
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] problem reading csv file (numbers read as strings)

2013-10-22 Thread matteo

You just drag and drop the csv in the map canvas and this is the result??
Because if I want to have the same, I have to save the file as dbf in 
Libreoffice (no big deal, but unfortunately not everyone has 
Libreoffice, and Excel is not able to save dbf files..).


BTW: I resolved the import of the coordinates. It was my fault: I 
installed qgis on my new debian and I forgot to enable the "prompt for 
CRS" setting.

Sorry guys
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] problem reading csv file (numbers read as strings)

2013-10-22 Thread Zirneklitis

QGIS 2.0.1 on Linux Mint Debian

matteo wrote:

..
But could you try to add a table (csv file) in the map canvas and see if
qgis recognize the numbers as numbers (real or integer, it doesn't matter)?
..
<>___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] problem reading csv file (numbers read as strings)

2013-10-22 Thread matteo

On 22/10/2013 16:50, Alexandre Neto wrote:

Well, let's mess things a bit more...

I have opened your csv using this settings 
[1].


And both coordinates fields were read as integer (because they have no 
decimal part), not texts



Thanks Alexandre..
Till 1.9 release QGIS asked immediately for the CRS. Now you have to 
specify it in the properties of the layer you have added. This problem 
is solved! :)


But could you try to add a table (csv file) in the map canvas and see if 
qgis recognize the numbers as numbers (real or integer, it doesn't matter)?


Thanks

Matteo

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

Re: [Qgis-user] problem reading csv file (numbers read as strings)

2013-10-22 Thread Zirneklitis
Just checked with QGIS 2.0.1 (Linux Mint Debian) - no problems with CSV 
as a layer. Sorry for that. Dropping to canvas creates text fields indeed.


Karlis


Matteo Ghetta wrote:

..
I'm sure that with qgis 1.8 I had no problem in importing a csv file.
Anyway, that's my current file:
..
As you can see there are no decimal numbers. You can find the csv file
also in attach.
Another problem: if I import a table (without coordinates and still as
csv file made in libreoffice) in the map canvas (just drag and drop it),
qgis still reads the numbers as strings (making the join option with
another shape file useless).
..

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


Re: [Qgis-user] problem reading csv file (numbers read as strings)

2013-10-22 Thread Alexandre Neto
Well, let's mess things a bit more...

I have opened your csv using this
settings
[1].

And both coordinates fields were read as integer (because they have no
decimal part), not texts

Cheers,

Alexandre

[1] https://dl.dropboxusercontent.com/u/110618644/Capturar.JPG


On Tue, Oct 22, 2013 at 2:59 PM, Matteo Ghetta wrote:

> Thanks for all the replies.
> I'm sure that with qgis 1.8 I had no problem in importing a csv file.
> Anyway, that's my current file:
>
>   ID X Y  2818/22/0834 3480240 5887204  2818/22/0851 3480183 5887073
> 2818/22/0853 3480060 5886803  2818/22/0886 3481095 5886981  B0F 3479888
> 5885731  B12T 3479805 5886002
>
> As you can see there are no decimal numbers. You can find the csv file
> also in attach.
> Another problem: if I import a table (without coordinates and still as csv
> file made in libreoffice) in the map canvas (just drag and drop it), qgis
> still reads the numbers as strings (making the join option with another
> shape file useless).
>
> Cheers
>
> Matteo
>
>
>
>
> 2013/10/22 Ramon Andiñach 
>
>> True. A couple if lines would be helpful. Generally QGIS 2.0 is fairly
>> good at guessing, so it would be interesting to see what's confusing it.
>>
>> Have you got the put apostrophes around text turned on?
>>
>> If all else fails you can force QGIS to do what you want.
>> http://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/
>>
>> -ramon.
>>
>> > On 22 Oct 2013, at 20:06, Zirneklitis  wrote:
>> >
>> > Hard to comment without example.
>> >
>> > Best regards,
>> > Karlis
>> >
>> > Matteo Ghetta wrote:
>> >> ..
>> >> I wrote a table with some field (two of them are x and y coordinates),
>> >> saved as csv and then I tried to upload it in qgis with the "add
>> >> delimited text" option.
>> >>
>> >> Problem: numeric filed are read as strings and not as numbers ..
>> > ___
>> > Qgis-user mailing list
>> > Qgis-user@lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/qgis-user
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] problem reading csv file (numbers read as strings)

2013-10-22 Thread Matteo Ghetta
Thanks for all the replies.
I'm sure that with qgis 1.8 I had no problem in importing a csv file.
Anyway, that's my current file:

  ID X Y  2818/22/0834 3480240 5887204  2818/22/0851 3480183 5887073
2818/22/0853 3480060 5886803  2818/22/0886 3481095 5886981  B0F 3479888
5885731  B12T 3479805 5886002

As you can see there are no decimal numbers. You can find the csv file also
in attach.
Another problem: if I import a table (without coordinates and still as csv
file made in libreoffice) in the map canvas (just drag and drop it), qgis
still reads the numbers as strings (making the join option with another
shape file useless).

Cheers

Matteo




2013/10/22 Ramon Andiñach 

> True. A couple if lines would be helpful. Generally QGIS 2.0 is fairly
> good at guessing, so it would be interesting to see what's confusing it.
>
> Have you got the put apostrophes around text turned on?
>
> If all else fails you can force QGIS to do what you want.
> http://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/
>
> -ramon.
>
> > On 22 Oct 2013, at 20:06, Zirneklitis  wrote:
> >
> > Hard to comment without example.
> >
> > Best regards,
> > Karlis
> >
> > Matteo Ghetta wrote:
> >> ..
> >> I wrote a table with some field (two of them are x and y coordinates),
> >> saved as csv and then I tried to upload it in qgis with the "add
> >> delimited text" option.
> >>
> >> Problem: numeric filed are read as strings and not as numbers ..
> > ___
> > Qgis-user mailing list
> > Qgis-user@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-user
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
ID,X,Y
2818/22/0834,3480240,5887204
2818/22/0851,3480183,5887073
2818/22/0853,3480060,5886803
2818/22/0886,3481095,5886981
B0F,3479888,5885731
B12T,3479805,5886002
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] problem reading csv file (numbers read as strings)

2013-10-22 Thread Ramon Andiñach
True. A couple if lines would be helpful. Generally QGIS 2.0 is fairly good at 
guessing, so it would be interesting to see what's confusing it. 

Have you got the put apostrophes around text turned on?

If all else fails you can force QGIS to do what you want. 
http://anitagraser.com/2011/03/07/how-to-specify-data-types-of-csv-columns-for-use-in-qgis/

-ramon.

> On 22 Oct 2013, at 20:06, Zirneklitis  wrote:
> 
> Hard to comment without example.
> 
> Best regards,
> Karlis
> 
> Matteo Ghetta wrote:
>> ..
>> I wrote a table with some field (two of them are x and y coordinates),
>> saved as csv and then I tried to upload it in qgis with the "add
>> delimited text" option.
>> 
>> Problem: numeric filed are read as strings and not as numbers ..
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] problem reading csv file (numbers read as strings)

2013-10-22 Thread Alexandre Neto
Hello Matteo,

I was able to open without problems a csv file produced in libbreoffice.

The coordinates fields were considered doubles. my file was like this:

Ponto 1;12,4;0,7
Ponto 2;10;0,9
Ponto 3;11;10

If if it's not a decimal separator issue.

Hope this helps.

Alexandre


On Tue, Oct 22, 2013 at 12:58 PM, Matteo Ghetta wrote:

> So are the old practical way: write the coordinates in libreoffice, save
> the table as csv and import it with the csv option in qgis doesn't work
> anymore in qgis 2?
>
> I have to teach how to import in a simple way gps coordinate tables.. Do
> you have any suggestions?
>
> Thanks
>
> Matteo
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] problem reading csv file (numbers read as strings)

2013-10-22 Thread Zirneklitis

Hard to comment without example.

Best regards,
Karlis

Matteo Ghetta wrote:

..
I wrote a table with some field (two of them are x and y coordinates),
saved as csv and then I tried to upload it in qgis with the "add
delimited text" option.

Problem: numeric filed are read as strings and not as numbers ..

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


[Qgis-user] problem reading csv file (numbers read as strings)

2013-10-22 Thread Matteo Ghetta
Hi all,
I work with a debian machine, QGIS 2 and libreoffice 3.
I wrote a table with some field (two of them are x and y coordinates),
saved as csv and then I tried to upload it in qgis with the "add delimited
text" option.

Problem: numeric filed are read as strings and not as numbers and so I
cannot convert the table in a point shape (in Libreoffice numbers are read
as numbers and I can do some calculation with them).
It seems that it doesn't matter if a numeric field has a decimal part or
not, qgis does not recognize them as numbers anyway.

Any help is appreciated

Cheers

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