TransWikia.com

QGIS importing CSV files only as attribute tables, although they contain coordinates in the right format

Geographic Information Systems Asked on March 15, 2021

I’ve got an issue importing CSV files to QGIS 3.12 Bucuresti and/or 3.4 Madeira.

Months ago I created a point distribution map for several species with several CSV files containing geographical data. I created the CSV files using Excel. The coordinates were determined with Google Earth or taken from literature or other sources. I made sure all coordinates had the same format. It worked all fine.

Now I wanted to work on those maps again, using the same data. When opening QGIS (it doesn’t matter which of the two versions) it appeared a window, that some layers were not available. I simply imported them again using the Data source manager, which solved the problem for all but one layer. Below a picture of the Data source manager for the not working file. The respective CSV file could only be imported as an attributes table. Hence the coordinates given in that file were not shown on the map. Some time later the same thing happened to a second layer, which worked fine just two days before.

Data Source manager import options for the not working file

I tried several things aside from checking the coordinates format. I copied the respective coordinates manually into a new file and imported it. It still was only an attributes table. I copied the respective coordinates into a working file and imported it to QGIS. Now the whole, formerly working file was imported as an attributes table, not assigning the coordinates to the map. I had a look on the CSV file itself and compared it to working CSV files. I couldn’t spot a difference. I looked in several forums, but couldn’t find a solution for this problem.

My understanding of QGIS has come to an end. What can I do to make this work?

Here an excerpt of the not working csv file ([…] indicate elisions):

ID;Justification;Country;Province;Locality;Year;y;x;Literature
1;locality approximated;Argentinia;Chaco;Valle del Parana;2002;31°S;60°5' W;"Arzamendia, Vanesa; Giraudo, Alejandro Raúl [...] sequence=1."
2;giant area;Brazil;Rio Grande do Sul;Central Depression;;29°80' S;51°50' W;"Aguiar, [...]5774806205."

2 Answers

Some things I feel will help make working with csv files easier (not absolutely necessary,though):

  1. Open the files in Excel to see and delete the empty rows and columns which might have inadvertently crept into the data, which might through a 'Badly formatted row' error.
  2. Its better to use negative latitude and longitude values for South and West.
  3. Give 'latitude' and 'longitude' as column names instead of 'y' and 'x'.

Answered by Indranil on March 15, 2021

For future users with a similar problem I want to post the solution for my problem.

The reason for QGIS not to import my coordinates was that I forgot to check the DMS coordinates box.

Thanks to all who helped with this pretty simple issue.

Answered by Yannis on March 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP