I've imported a .csv file (with relative .csvt) in QGIS 2.8.4 adding a delimited text layer... the table was correctly been imported but the table fields have a length of zero... the fields types instead have been correctly read from the .csvt, which obviously specifies also the fields lengths.
-
The fields lengths are correctly read simply dragging and dropping the .csv file into the layer panel... (?!?)– Bryan CiceriJun 23, 2016 at 9:14
-
Could you maybe make a printscreen of the problem?– Konan PruiksmaJun 24, 2016 at 11:28
-
1Can you provide a sample of the data and csvt?– Alexandre NetoJun 24, 2016 at 15:47
-
Thanks @AndreJ I didn't know that QGIS doesn't read the .csvt with "Add delimited text"– Bryan CiceriJun 24, 2016 at 19:45
1 Answer
According to gdal.org/drv_csv, you can define width and precision in the csvt file.
BUT:
According to Why are some columns not recognized as numeric even though I have a CSVT?, QGIS does NOT read the csvt with Add delimited text
. Instead, it makes some kind of educated guess about the data types
Try Add Vector Layer
instead. Draging and dropping the csv file from an explorer window to the legend will do the same, as you experienced.