[Qgis-user] Qgis-user Digest, Vol 92, Issue 51 Topic 1
Ian kirk-ellis
Ian.kirk-ellis at rodgersleask.co.uk
Tue Oct 22 08:38:09 PDT 2013
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-bounces at lists.osgeo.org [mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of qgis-user-request at lists.osgeo.org
Sent: 22 October 2013 16:04
To: qgis-user at lists.osgeo.org
Subject: Qgis-user Digest, Vol 92, Issue 51
Send Qgis-user mailing list submissions to
qgis-user at 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-request at lists.osgeo.org
You can reach the person managing the list at
qgis-user-owner at 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.neto at gmail.com>
To: Matteo Ghetta <matteo.ghetta at gmail.com>
Cc: QGIS Mailing List <qgis-user at lists.osgeo.org>
Subject: Re: [Qgis-user] problem reading csv file (numbers read as
strings)
Message-ID:
<CA+H0G_EyUSP-HBxSWvN73t9dU4Yk-R8R08PUmYtjAFZELHzvsg at 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.ghetta at 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 <custard at 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 <eko at 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 at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/qgis-user
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at 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.neumann at carto.net>
To: qgis-user International <qgis-user at lists.osgeo.org>
Subject: [Qgis-user] reprojection troubles
Message-ID: <52669344.8070301 at 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 <eko at lanet.lv>
To: QGIS Mailing List <qgis-user at lists.osgeo.org>
Subject: Re: [Qgis-user] problem reading csv file (numbers read as
strings)
Message-ID: <526693BB.1080202 at 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 at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
End of Qgis-user Digest, Vol 92, Issue 51
*****************************************
More information about the Qgis-user
mailing list