-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSV: "Detect field types" doesn't update the sample view #27466
Comments
Author Name: Giovanni Manghi (@gioman) What is "very buggy"? Do you mean in general or compared to 2.18/LTR?
|
Author Name: Tobias Wendorff (Tobias Wendorff) Giovanni Manghi wrote:
In general. I've filed a bug some months ago. It partially go fixed, but "Detect field types" is still broken. Numbers like "04595" still get parsed into "4595", which creates corrupted data (please check, how OGR does it... it's working perfect) - but that's not part of this ticket. Since the preview of "Detect field types" doesn't work, you can only see the corrupted data in the attribute table. Some guys have very big CSV files, so it's hard for them to find the corruption at all. |
Author Name: Giovanni Manghi (@gioman) Tobias Wendorff wrote:
for example when translating a CSV to a shapefile with ogr2ogr? |
Author Name: Tobias Wendorff (Tobias Wendorff) Giovanni Manghi wrote:
Yes, like this: "AUTODETECT_SIZE_LIMIT=0" means: scan the whole file (data gets loaded into a buffer instead reading from STDIN), normally it's 100,000 rows (which is too low on some of my datasets). Importing data into "R" works similar, it's another workaround. CSVT works inside of QGIS, BUT you can't make QGIS use the CSV's header... I think, when loading a CSV with CSVT, OGR gets used. But you can't tell it to use the first line as a header :-( |
Author Name: Giovanni Manghi (@gioman)
I just loaded the attached CSV in QGIS (using the 'add vector layer' dialog) and the first line was indeed used as header.
|
Author Name: Tobias Wendorff (Tobias Wendorff) Giovanni Manghi wrote:
Nah, I was talking about CSVT. When opening a CSV, which has a CSVT, the header line of the CSV is loaded as a data line. It can't be disabled. After all, the reported bug is still open. Please have a look, how OGR did it. It's a pretty simple, but effective logic. Right now, the function is broken and should be disabled.
|
Author Name: Giovanni Manghi (@gioman) Tobias Wendorff wrote:
the title nor the description talks about CSVT files, can you please help clarify? If there are different issues here they must be filed in separate tickets.
|
Author Name: Giovanni Manghi (@gioman) Tobias Wendorff wrote:
just tried, both lading thr csv as a table or as a point layer (using the delimited text provider). In the latter case the CSVT is not used, I think this is expected.
In my case the fields types were detected correctly (using master), could you please attach sample data, thanks. |
Author Name: Tobias Wendorff (Tobias Wendorff) Yay, it really works for CSVT now, but normal CSV files still get bad results. first.csvt ```String(255),Real,String(255),Real
second.csv ```zipcode;number_science;number_comma;number_point
|
Author Name: Tobias Wendorff (Tobias Wendorff) Whoops, forgot to open it again.
|
Author Name: Giovanni Manghi (@gioman)
this is a different issue from the one in the description/subject of this title and should be reported in a separated ticket(?).
|
Author Name: Jürgen Fischer (@jef-n) Bulk closing 82 tickets in feedback state for more than 90 days affecting an old version. Feel free to reopen if it still applies to a current version and you have more information that clarify the issue.
|
Author Name: Tobias Wendorff (Tobias Wendorff)
Original Redmine Issue: 19639
Affected QGIS version: 3.2.1
Redmine category:data_provider/delimited_text_
When selecting "Detect field types", the sample view doesn't change. It's expected to have a preview, of how QGIS will modify the content (since it's still very buggy, a preview is important).
All newer versions are affected (at least >= 3.1).
The text was updated successfully, but these errors were encountered: