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.

I have problems importing a .csv file.

Some Values of the file are not supposed to be formated in text style, but in number style, thus i created an additional .csvt file like explained here.

Both files with exactly the same name and the same location are created. The number of columns is the same and I add the .csv file with the "Add Delimited Text Layer" tool. Nevertheless I am not able to choose any columns for a graduated symbology.

My .csv file includes 12 rows, of which the 5th, 11th, and 12th column consist numbers. My .csvt file therefore looks like that:

"String","String","String","String","Integer","String","String","String","String","String","Integer","Integer"

I tried to create it with the standard editor from Windows and Notepad++. Are there any common mistakes done by newbies, like I am one? Thank you for your help!

share|improve this question
    
Correction of the above - using QGIS 2.0.1 - the 'add delimited text layer' doesn't require a geometry column, you can simply check the box for 'No geometry (attribute only table)'. The file will still obviously require a geo-reference field if you are going to join with another existing vector layer. –  Andy Feb 7 at 9:59

1 Answer 1

up vote 10 down vote accepted

The "Add delimited text layer" tool does not interpret the CSVT. Only "add vector layer" needs a CSVT. Basically, "add delimited text layer" tries to make a best guess and it usually does very well recognizing numeric values. One of the reasons to use "add vector layer" is that "add delimited text layer" requires a geometry column.

Does your CSV contain a geometry or x and y columns? Then use "add delimited text layer".

If your CSV does not contain any coordinates/geometry, use "add vector layer".

As to why the numeric values are not recognized by "add delimited text layer", please post your CSV or at least a sample (first few lines). If even one line in the file contains a text in the "numeric" column, the tools will default back to String.

share|improve this answer
1  
I had a letter in one line, after correcting this mistake, it worked with the "Add Delimited Text Layer" tool. Thank you very much! (also for the correction of my title for the question, I will try to pay more attention on a good title for my upcoming questions!) –  Gideon Jan 2 '13 at 0:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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