Alexandro,

When inputting a csv file, you need to create within the same folder a csvt 
file, which sets the data type for each field and the number of characters. 
Once you have created this file, then reqad in the csv and the data should come 
in the correct format. You can have integer, real or text data types. Hope that 
helps.

Ian

-----Original Message-----
From: qgis-user-boun...@lists.osgeo.org 
[mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of 
qgis-user-requ...@lists.osgeo.org
Sent: 22 October 2013 16:04
To: qgis-user@lists.osgeo.org
Subject: Qgis-user Digest, Vol 92, Issue 51

Send Qgis-user mailing list submissions to
        qgis-user@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.osgeo.org/mailman/listinfo/qgis-user
or, via email, send a message with subject or body 'help' to
        qgis-user-requ...@lists.osgeo.org

You can reach the person managing the list at
        qgis-user-ow...@lists.osgeo.org

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Qgis-user digest..."


Today's Topics:

   1. Re: problem reading csv file (numbers read as strings)
      (Alexandre Neto)
   2. reprojection troubles (Andreas Neumann)
   3. Re: problem reading csv file (numbers read as strings)
      (Zirneklitis)


----------------------------------------------------------------------

Message: 1
Date: Tue, 22 Oct 2013 15:50:48 +0100
From: Alexandre Neto <senhor.n...@gmail.com>
To: Matteo Ghetta <matteo.ghe...@gmail.com>
Cc: QGIS Mailing List <qgis-user@lists.osgeo.org>
Subject: Re: [Qgis-user] problem reading csv file (numbers read as
        strings)
Message-ID:
        <ca+h0g_eyusp-hbxswvn73t9du4yk-r8r08pumytjafzelhz...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

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

I have opened your csv using this
settings<https://dl.dropboxusercontent.com/u/110618644/Capturar.JPG>
[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 <matteo.ghe...@gmail.com>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 <cust...@westnet.com.au>
>
>> 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-co
>> lumns-for-use-in-qgis/
>>
>> -ramon.
>>
>> > On 22 Oct 2013, at 20:06, Zirneklitis <e...@lanet.lv> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.osgeo.org/pipermail/qgis-user/attachments/20131022/96aea294/attachment-0001.html>

------------------------------

Message: 2
Date: Tue, 22 Oct 2013 17:01:24 +0200
From: Andreas Neumann <a.neum...@carto.net>
To: qgis-user International <qgis-user@lists.osgeo.org>
Subject: [Qgis-user] reprojection troubles
Message-ID: <52669344.8070...@carto.net>
Content-Type: text/plain; charset=UTF-8

Hi,

I was trying to convert natural earth 110m layers from EPSG 4326 to EPSG 3857.

Two of the layers (ocean and land) fail to convert with the following error:

Error 6
Feature write errors:
Failed to transform a point while drawing a feature with ID '8'. Writing 
stopped. (Exception: forward transform of (3.141593, -1.570796)
PROJ.4: +proj=longlat +datum=WGS84 +no_defs +to +proj=merc +a=6378137
+b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m 
+nadgrids=@null +wktext  +no_defs
Error: tolerance condition error)

Is there anything I can do about this tolerance condition error?

Thanks for any hint,
Andreas


------------------------------

Message: 3
Date: Tue, 22 Oct 2013 18:03:23 +0300
From: Zirneklitis <e...@lanet.lv>
To: QGIS Mailing List <qgis-user@lists.osgeo.org>
Subject: Re: [Qgis-user] problem reading csv file (numbers read as
        strings)
Message-ID: <526693bb.1080...@lanet.lv>
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"

The given file was added as a layer without any problems (QGI 2.1-Master/Fedora 
18x64).

Best regards,
Karlis


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.
> ..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CSV_import.png
Type: image/png
Size: 12407 bytes
Desc: not available
URL: 
<http://lists.osgeo.org/pipermail/qgis-user/attachments/20131022/1116ef69/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: table_coordinates.png
Type: image/png
Size: 31431 bytes
Desc: not available
URL: 
<http://lists.osgeo.org/pipermail/qgis-user/attachments/20131022/1116ef69/attachment-0001.png>

------------------------------

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

End of Qgis-user Digest, Vol 92, Issue 51
*****************************************
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to