Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
Hi Chris, Good on you. I logged it yesterday (#13187). Do you get to mark it as fixed? For the sake of a snail-trail, it's probably better than me just withdrawing it? I completed the job I was doing, by parsing the csv files in bash (I moved the job over to my linux setup - I only use the Windows version for 'quickies'), so for now I am not in a hurry for this - but if I get another request for the job I was doing, I'll just pull the code and build it on my system. Thanks again for seeing the bigger picture. Regards, Zoltan On 2015/08/07 00:32, Chris Crook wrote: Hi Zoltan I've removed this constraint on field names from the QGIS code - this will apply in the next release of QGIS. So no need to raise a bug. If you do want to (or have other issues/feature requests) information about how to do so is at http://qgis.org/en/site/getinvolved/development/index.html#bugs-features-and-issues. Feedback from the user community is certainly encouraged. Until the next release though you may have to write a script to deal with the files (or live with the replaced field names). As to the silence - who knows! Certainly this hasn't been raised to my knowledge, and the feature has been there a couple of years now. I think if many users were affected this would have come up sooner, but great that you have raised it. Cheers Chris -Original Message- From: Zoltan Szecsei [mailto:zolt...@geograph.co.za] Sent: Thursday, 6 August 2015 5:32 p.m. To: Chris Crook; 'Qgis-developer@lists.osgeo.org' Subject: Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem 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:zolt...@geograph.co.za] Sent: Tuesday, 4 August 2015 10:27 p.m. To: Qgis-developer@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 i...@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 === 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 i...@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
Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
Hi Zoltan, On Thu, 06. Aug 2015 at 08:04:19 +0200, Zoltan Szecsei wrote: Whilst I am not too perturbed because I can get around this issue, I figured it was my civic duty to raise it. You can also use Add Vector layer... to load that csv (via OGR) and it'll have the original field names (if they are quoted in the first line - like in your example) and workaround that edge case. Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de QGIS release manager (PSC) GermanyIRC: jef on FreeNode signature.asc Description: Digital signature ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
Hi Andreas, 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. I posted the issue because 1. There are possibly users out there who have issues with this, but may not be brave enough to publicly state this as an error, 2. Because as a user, I find it a responsibility to provide feedback when/if I see fit. 3. 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. 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. [sense of humour required, please] Regards and keep well, Zoltan On 2015/08/06 11:30, Neumann, Andreas wrote: Hi, 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? 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. If you want to have it fixed you have the three options: - Fix it yourself in the code and provide a pull request - Pay a developer to fix it to have it fixed in a short time frame - File a feature request and wait until someone has the time to fix it Andreas On 2015-08-06 08:04, Zoltan Szecsei wrote: Hi, Fine - I did ask for an opinion, and I got one :-) 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. 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:zolt...@geograph.co.za mailto:zolt...@geograph.co.za] Sent: Tuesday, 4 August 2015 10:27 p.m. To: Qgis-developer@lists.osgeo.org mailto:Qgis-developer@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
Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
Hi Jürgen, Thanks for this - but this is not an issue for me, as I stated in my original post, I can work-around it. I'll respond in slightly more detail for Andreas' post. Regards, Zoltan On 2015/08/06 12:02, Jürgen E. Fischer wrote: Hi Zoltan, On Thu, 06. Aug 2015 at 08:04:19 +0200, Zoltan Szecsei wrote: Whilst I am not too perturbed because I can get around this issue, I figured it was my civic duty to raise it. You can also use Add Vector layer... to load that csv (via OGR) and it'll have the original field names (if they are quoted in the first line - like in your example) and workaround that edge case. Jürgen ___ Qgis-developer mailing list Qgis-developer@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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
Hi, Fine - I did ask for an opinion, and I got one :-) 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. 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:zolt...@geograph.co.za mailto:zolt...@geograph.co.za] Sent: Tuesday, 4 August 2015 10:27 p.m. To: Qgis-developer@lists.osgeo.org mailto:Qgis-developer@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 http://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 i...@linz.govt.nz mailto:i...@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 http://www.geograph.co.za === ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org mailto:Qgis-developer@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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
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 zolt...@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:zolt...@geograph.co.za] Sent: Tuesday, 4 August 2015 10:27 p.m. To: Qgis-developer@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 i...@linz.govt.nzi...@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
Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
Hi, 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? 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. If you want to have it fixed you have the three options: - Fix it yourself in the code and provide a pull request - Pay a developer to fix it to have it fixed in a short time frame - File a feature request and wait until someone has the time to fix it Andreas On 2015-08-06 08:04, Zoltan Szecsei wrote: Hi, Fine - I did ask for an opinion, and I got one :-) 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. 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:zolt...@geograph.co.za] Sent: Tuesday, 4 August 2015 10:27 p.m. To: Qgis-developer@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 [1] === 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 i...@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
Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
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:zolt...@geograph.co.za] Sent: Tuesday, 4 August 2015 10:27 p.m. To: Qgis-developer@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 [1] === 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 i...@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 [1] === ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer [2] Links: -- [1] http://www.geograph.co.za [2] http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
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:zolt...@geograph.co.za] Sent: Tuesday, 4 August 2015 10:27 p.m. To: Qgis-developer@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 i...@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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
Hi Zoltan, I wonder if this is a DBF format restriction. If I remember correctly DBF field names have to start with a letter followed by any combination of letters and numbers up to the maximum field name length. Frank. On 04/08/2015 12:26, Zoltan Szecsei wrote: 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 ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
Hi Frank, Reasonable thought, thanks - but I named the 1p (not p1) and that worked. Would be interesting to see what the author of the CSV import section of QGIS has to say. Regards, Zoltan On 2015/08/04 13:29, Frank Sokolic wrote: Hi Zoltan, I wonder if this is a DBF format restriction. If I remember correctly DBF field names have to start with a letter followed by any combination of letters and numbers up to the maximum field name length. Frank. On 04/08/2015 12:26, Zoltan Szecsei wrote: 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 ___ Qgis-developer mailing list Qgis-developer@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@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[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 === ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] QGIS 2.10.1 Pisa - Read CSV file problem
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:zolt...@geograph.co.za] Sent: Tuesday, 4 August 2015 10:27 p.m. To: Qgis-developer@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 i...@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. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer