Feature request #18387

Add csvt files when csv files are used as algorithm output

Added by Håvard Tveite over 2 years ago. Updated over 2 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Processing/QGIS
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:26277

Description

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.

History

#1 Updated by Giovanni Manghi over 2 years ago

  • Category changed from Unknown to Processing/QGIS
  • Tracker changed from Bug report to Feature request

Also available in: Atom PDF