1

I am trying to upload a CSV file with Lat and Long data in it and there are two columns that are not numeric (see picture below). Whenever I try and upload the file, QGIS recognizes it as a string file and loads all the data in one line, which isn't what I want. Is there any way to get this to load as a delimited text layer or should I be loading it in as a different layer? I tried loading it in as a vector layer but then it called the lat long columns "real" not "integer" and I couldn't see them displayed (probably because of this).

enter image description here enter image description here

  • Can you provide a sample of your CSV file as it appears in a text editor? It looks like whatever you're using to create/edit the CSV isn't formatting the newline correctly, based on the "BSD_Y_N ABA" field name in your second screenshot. – Dan C Oct 12 '16 at 15:37
  • are you using a Mac? If so see this question and the answers. Seems to be down to the difference in how line endings are handled on the Mac. – Steven Kay Oct 12 '16 at 18:16
2

I have a .csv file (Comma-separated values), i.e. a raw ascii text file like this:

"House_number","count"
"1",103991
"10",81932
"100",4997
"100A",358
"100B",350
"100C",184

I load it in QGIS, using 'Add Delimited text layer', like this:

enter image description here

And it shows up perfect in the table afterwards. Note that text fields left-justify, while number fields right-justify.

enter image description here

  • If you look at the new picture added above, you can see how it loads. Not at all like it's supposed to – Sarah Powell Oct 12 '16 at 15:22
0

The reason that it wasn't working was likely two-fold. I had to save the file as a windows CSV not a normal CSV and also I had a number in the one of column headers that I think was throwing it off. However, it is now loading into QGIS properly. Thank you for the help!

  • Don't hesitate the mark the answer that solved your problem... :-) – MartinHvidberg Oct 14 '16 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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