<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Andreas,<br>
I didn't get you wrong, your point on the smallness of this issue is
quite valid, and I don't personally have a problem with this silent
error, so I am just providing feedback.<br>
<br>
I posted the issue because <br>
<ol>
<li>There are possibly users out there who have issues with this,
but may not be brave enough to publicly state this as an error,</li>
<li>Because as a user, I find it a responsibility to provide
feedback when/if I see fit.</li>
<li>I know there should be some pride in making QGIS as robust as
possible, so may (some) devs want to know about the smaller
issues.<br>
</li>
</ol>
<p>So, I've logged it as a bug, and I am not putting in an invoice
for my time doing so. In the spirit of open source, you
understand.<br>
[sense of humour required, please]<br>
</p>
<p>Regards and keep well,<br>
Zoltan<br>
</p>
<div class="moz-cite-prefix">On 2015/08/06 11:30, Neumann, Andreas
wrote:<br>
</div>
<blockquote cite="mid:e5077dbe1f5f085c9fc99444b0cd477a@carto.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<p>Hi,</p>
<p>Don't get me wrong. I am not against fixing it. I was just
trying to put it into perspective. Just because there is one
dataset that has these weird column names it doesn't mean the
CSV import tool is broken. You can just as well advise the
StatsSA agency to improve their column names into something more
meaningful - e.g. age_10 - what if you want to join the data
later and you have again column names with numbers? What if
another person takes over the project and has no idea what the
numbers mean without a separate metadata description? What if
you want to do "Save AS" with such a layer and the data format
prohibits columns named with numbers?</p>
<p>Anyway - its not good practice to name columns with numbers. In
most database you will have to escape such column names with
quotes or it is even forbidden.</p>
<p>If you want to have it fixed you have the three options:</p>
<p>- Fix it yourself in the code and provide a pull request<br>
- Pay a developer to fix it to have it fixed in a short time
frame<br>
- File a feature request and wait until someone has the time to
fix it</p>
<p>Andreas</p>
<p>On 2015-08-06 08:04, Zoltan Szecsei wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left:
#1010ff 2px solid; margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->Hi,<br>
Fine - I did ask for an opinion, and I got one :-)<br>
<br>
The CSV files are from South Africa's 2011 Census - as put out
by StatsSA, and exported from SuperCROSS.<br>
In this particular file, the numeric field names are for the
"Age last birthday" of the occupant. (yep, from 0 to 120!!!)<br>
<br>
So in short, I guess there are many, many users of this data -
and for me an unnoticed error/deficiency, is still and
error/deficiency.<br>
<br>
Whilst I am not too perturbed because I can get around this
issue, I figured it was my "civic" duty to raise it.<br>
<br>
Cheers for now,<br>
Zoltan<br>
<br>
<br>
<div class="moz-cite-prefix">On 2015/08/06 07:56, Neumann,
Andreas wrote:</div>
<blockquote type="cite" style="padding: 0 0.4em; border-left:
#1010ff 2px solid; margin: 0">
<p>Hi,</p>
<p>In my opinion it is quite "special" to name columns with
integer numbers. Not what the average GIS user would do. In
my own 2-decade GIS career I never had such an issue.</p>
<p>I am not against fixing this issue, but I don't think it is
a serious issue. We have many more important issues in QGIS.</p>
<p>Andreas</p>
<p>On 2015-08-06 07:31, Zoltan Szecsei wrote:</p>
<blockquote style="padding: 0 0.4em; border-left: #1010ff 2px
solid; margin: 0;"><!-- node type 8 --><!-- node type 8 --><!-- node type 8 -->
<div class="pre" style="margin: 0; padding: 0; font-family:
monospace;">Hi Chris,<br>
Thanks for the opinion.<br>
Do I log this as a bug?<br>
<br>
Whilst I am quite happy to write a bash script to parse
and alter my 500 CSV files, I do feel that this is likely
a more serious issue, as it will affect, I assume a lot
of, users that load CSV files to join them to their
spatial data.<br>
Maybe the silence on this is because it either goes
unnoticed, or there are many people just doing a
work-around.<br>
<br>
Let me know.<br>
<br>
Thanks & regards,<br>
Zoltan<br>
<br>
On 2015/08/05 02:55, Chris Crook wrote:
<blockquote style="padding: 0 0.4em; border-left: #1010ff
2px solid; margin: 0;">Hi Zoltan<br>
<br>
I think this could be classed as an error! The source code rejects field names that look like positive numbers (some digits optionally followed by a period and some more digits).<br>
<br>
I can't recall a reason why it should do this. It could be reasonable to require field names to be compatible to database attribute names, but I can't see any need for that within QGIS itself. This can go on a 'to-do' list to fix...<br>
<br>
Cheers<br>
Chris<br>
<br>
<blockquote style="padding: 0 0.4em; border-left:
#1010ff 2px solid; margin: 0;">-----Original Message-----<br>
From: Zoltan Szecsei [mailto:<a moz-do-not-send="true"
href="mailto:zoltans@geograph.co.za">zoltans@geograph.co.za</a>]<br>
Sent: Tuesday, 4 August 2015 10:27 p.m.<br>
To: <a moz-do-not-send="true"
href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
Subject: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem<br>
<br>
Hi,<br>
Using the above version on Win 7 64 bit, I read a CSV file (as attributes only)<br>
stipulating that "first record has field names"<br>
Record 1 is as follows:<br>
"SALnum","SALnam","1","2","3","4","5","6","7","8","9","10+"<br>
<br>
When I open the attribute table, I see that fields 1 & 2 have names SALnum<br>
and SALnam, but the rest are called 'Field_3', 'Field_4' and so on.<br>
<br>
When I edit record 1 of this CSV file to look like:<br>
"SALnum","SALnam","1p","2p","3p","4p","5p","6p","7p","8p","9p","10+p"<br>
<br>
The I get the correct field names (albeit 1p instead of just "1")<br>
<br>
Is this an error, or is there some reason further down the line, that attribute<br>
tables cannot have 'numeric' field names?<br>
<br>
Thanks and regards,<br>
Zoltan<br>
<br>
<br>
--<br>
<br>
===========================================<br>
Zoltan Szecsei PrGISc [PGP0031]<br>
Geograph (Pty) Ltd.<br>
GIS and Photogrammetric Services<br>
<br>
P.O. Box 7, Muizenberg 7950, South Africa.<br>
<br>
Mobile: +27-83-6004028<br>
Fax: +27-86-6115323 <a moz-do-not-send="true"
href="http://www.geograph.co.za">www.geograph.co.za</a><br>
===========================================<br>
<br>
</blockquote>
<br>
This message contains information, which may be in confidence and may be subject to legal privilege. If you are not the intended recipient, you must not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify us immediately (Phone 0800 665 463 or <a
moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:info@linz.govt.nz"><a class="moz-txt-link-abbreviated" href="mailto:info@linz.govt.nz">info@linz.govt.nz</a></a>) and destroy the original message. LINZ accepts no responsibility for changes to this email, or for any attachments, after its transmission from LINZ. Thank You.</blockquote>
<br>
-- <br>
<br>
===========================================<br>
Zoltan Szecsei PrGISc [PGP0031]<br>
Geograph (Pty) Ltd.<br>
GIS and Photogrammetric Services<br>
<br>
P.O. Box 7, Muizenberg 7950, South Africa.<br>
<br>
Mobile: +27-83-6004028<br>
Fax: +27-86-6115323 <a moz-do-not-send="true"
href="http://www.geograph.co.za">www.geograph.co.za</a><br>
===========================================<br>
<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a moz-do-not-send="true"
href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></div>
</blockquote>
<p> </p>
<div> </div>
</blockquote>
<br>
<pre class="moz-signature">--
===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
GIS and Photogrammetric Services
P.O. Box 7, Muizenberg 7950, South Africa.
Mobile: +27-83-6004028
Fax: +27-86-6115323 <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="http://www.geograph.co.za">www.geograph.co.za</a>
===========================================</pre>
</blockquote>
<p> </p>
<div> </div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
GIS and Photogrammetric Services
P.O. Box 7, Muizenberg 7950, South Africa.
Mobile: +27-83-6004028
Fax: +27-86-6115323 <a class="moz-txt-link-abbreviated" href="http://www.geograph.co.za">www.geograph.co.za</a>
===========================================</pre>
</body>
</html>