Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This question already has an answer here:

QGIS keeps reading in my numeric data from .csv files as string data. This means I have to figure out how to read it in with the proper data type, or convert it back to numeric inside of QGIS, neither of which I know how to do. Why is it doing this, and how do I fix it?

share|improve this question

marked as duplicate by underdark Apr 12 '13 at 5:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers 2

Take a look at @underdark's tutorial on How to Specify Data Types of CSV Columns for Use in QGIS.

share|improve this answer

I suggest creating a schema.ini file for your CSV data. If it doesn't exist, create an empty file and call it schema.ini. Edit it following the instructions found here. As an example, if your csv is called output1.csv, and the second column is called myValues and you want to make sure it is read as a long integer, the following would take care of it. You'll need to restart QGIS after creating the schema.ini.

[output1.csv]
Col2=myValues Long
share|improve this answer
1  
Are you sure that works? ogr uses a csvt file format. –  Nathan W Apr 12 '13 at 1:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.