[Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem

DelazJ delazj at gmail.com
Thu Aug 6 01:16:32 PDT 2015


Hi,
I think this should be reported. If there is no reason why a csv should not
have column fields name as numbers, then this is a bug, maybe a small bug,
but it's a feature that QGIS needs to handle.

2015-08-06 8:04 GMT+02:00 Zoltan Szecsei <zoltans at geograph.co.za>:

> Hi,
> Fine - I did ask for an opinion, and I got one :-)
>
> Then I'll also give mine, for what it's worth.

The CSV files are from South Africa's 2011 Census - as put out by StatsSA,
> and exported from SuperCROSS.
> In this particular file, the numeric field names are for the "Age last
> birthday" of the occupant. (yep, from 0 to 120!!!)
>
> 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.
>
> I do agree with u. I think this should be reported. If there is no reason
why a csv should not have column fields named as numbers (shapefiles does
accept this kind of field name so joining csv like this might be allowed),
then this is a bug (or feature request?), maybe a small bug for some of us.
We don't all have same skills, what appears easy to handle for someone can
be a huge barrier for someone else. And as a community, we should make easy
the path for every one.
I know there are priorities but reporting an issue doesn't mean that it
should be fixed in the day. In QGIS Hub, you'll easily find reports that
are there for years. IMO, it's a feature that QGIS needs to handle. Report
it and if one day, someone finds enough time and skills to fix it, it'll be
done.

Regards,
DelazJ


> Whilst I am not too perturbed because I can get around this issue, I
> figured it was my "civic" duty to raise it.
>
> Cheers for now,
> Zoltan
>
>
>
> On 2015/08/06 07:56, Neumann, Andreas wrote:
>
> Hi,
>
> 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.
>
> 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.
>
> Andreas
>
> On 2015-08-06 07:31, Zoltan Szecsei wrote:
>
> Hi Chris,
> Thanks for the opinion.
> Do I log this as a bug?
>
> 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.
> Maybe the silence on this is because it either goes unnoticed, or there
> are many people just doing a work-around.
>
> Let me know.
>
> Thanks & regards,
> Zoltan
>
> On 2015/⁠08/⁠05 02:55, Chris Crook wrote:
>
> Hi Zoltan
>
>
> 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).
>
>
> 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...
>
> Cheers
> Chris
>
> -⁠-⁠-⁠-⁠-⁠Original Message-⁠-⁠-⁠-⁠-⁠
> From: Zoltan Szecsei [mailto:zoltans at geograph.co.za]
> Sent: Tuesday, 4 August 2015 10:27 p.m.
> To: Qgis-developer at lists.osgeo.org
> Subject: [Qgis-⁠developer] QGIS 2.10.1 Pisa -⁠ Read CSV file problem
>
> Hi,
>
> Using the above version on Win 7 64 bit, I read a CSV file (as attributes only)
> stipulating that "first record has field names"
> Record 1 is as follows:
> "SALnum","SALnam","1","2","3","4","5","6","7","8","9","10+"
>
> When I open the attribute table, I see that fields 1 & 2 have names SALnum
> and SALnam, but the rest are called 'Field_3', 'Field_4' and so on.
>
> When I edit record 1 of this CSV file to look like:
> "SALnum","SALnam","1p","2p","3p","4p","5p","6p","7p","8p","9p","10+p"
>
> The I get the correct field names (albeit 1p instead of just "1")
>
>
> Is this an error, or is there some reason further down the line, that attribute
> tables cannot have 'numeric' field names?
>
> Thanks and regards,
> Zoltan
>
>
> -⁠-⁠
>
> ===========================================
> 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     www.geograph.co.za
> ===========================================
>
>
>
> 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
> <info at linz.govt.nz>info at linz.govt.nz
> ) 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.
>
>
> --
>
> ===========================================
> 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     www.geograph.co.za
> ===========================================
>
> _______________________________________________
> Qgis-⁠developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
>
> --
>
> ===========================================
> 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     www.geograph.co.za
> ===========================================
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150806/a5f3c7a1/attachment-0001.html>


More information about the Qgis-developer mailing list