Add csvt files when csv files are used as algorithm output #26277
Labels
Feature Request
Processing
Relating to QGIS Processing framework or individual Processing algorithms
Author Name: Håvard Tveite (@havatv)
Original Redmine Issue: 18387
Redmine category:processing/qgis
Some algorithms output csv files, and these often contain numeric fields. The output (csv) files are added to the layers panel and made available to the user. However, if there is no csvt file associated with a csv file, QGIS (GDAL/OGR) will assume that all the fields of the csv file are strings. Having numeric fields handled as strings is inconvenient for users, as they will not be able to for instance sort numerically, create graduated maps or do mathematics.
"Statistics by categories" is an example of an algorithm that outputs csv.
If a csvt file could be created alongside the csv file, QGIS (GDAL/OGR) should be able get the correct data type of each field, and the user would be able to work on the output table immediately and without data type problems.
This is relevant for both QGIS 2 and QGIS 3.
The text was updated successfully, but these errors were encountered: