2

enter image description hereIn QGIS I am trying to add a CSV file to my project that only has a location and coordinates. Whenever I tried to load the file into QGIS the layer was unavailable. How can I fix that?

Here is my workflow: Layer -> Add Layer -> Add Delimited Text Layer -> choose file name.csv -> file format = custom -> Record and fiel options = decimal separator is comma -> Geometry Definition = Point coordinates (choose X and Y accordingly) -> projections is EPSG:3857 - WG84

I tried moving the CSV file to a shorter path; I tried using dots as delimiters; I tried a TXT file; I changed the call type in the Excel file to "numeric" but nothing worked and I can't see why.

Here are the points I want to use (not the real ones)

ID;lon;Lat
1;3,769070177;6,913269849
2;3,768783623;6,91293787
3;3,780608417;6,911546137
4;3,77924728;6,911425323
5;3,786876021;6,911021632
6;3,794008434;6,911352979
7;3,794192931;6,911396386
8;3,794074327;6,911490433
9;3,793968898;6,911497667
10;3,793863466;6,911512136
11;3,794037427;6,911509242
12;3,794774038;6,913701613
13;3,795780552;6,915063268
14;3,801153772;6,911510689
15;3,801466822;6,911297997
16;3,802396613;6,911206118
17;3,810236213;6,907249815

Screenshot of my added layers, the one named "Nest" is the one I try to add, but it always appears this way

6
  • 5
    Works for me. Did you check the semicolon box when selecting the custom separator?
    – user30184
    Commented Jun 3 at 18:43
  • 3
    EPSG:3857 is web mercator and uses metres as XY. I think you want EPSG:4326 geographic which uses degrees (lon, lat)
    – user2856
    Commented Jun 3 at 23:00
  • Are those points meant to be in Nigeria?
    – user2856
    Commented Jun 4 at 8:56
  • Read the question carefully: "...points I want to use (not the real ones)". They are fake coordinates, but it does not matter.
    – user30184
    Commented Jun 4 at 10:11
  • 2
    @user30184 "Read the question carefully" I did, and I understood that the points are fake. However, if the fake points are not supposed to be there then the CRS may not be what I think it is.
    – user2856
    Commented Jun 4 at 22:13

1 Answer 1

5

Import the CSV with Data Source Manager (see the QGIS Documentation | Importing a delimited text file for more details) and make sure:

  1. File Format: set delimiter to Semicolon (uncheck comma)
  2. Record and Fields Options: check the three boxes Decimal separator is comma, the First record has field names as well as Detect field types.
  3. Geometry Definition: check Point coordinates, set X field to lon and Y field to Lat, then for Geometry CRS select EPSG:4326 - WGS 84

Uncheck DMS coordinates (you have checked it on your screenshot: please compare every single setting on my screenshot to make it look exactly the same on your import dialog). As we can see, your coordinates are not in DMS format, so that might be the reason why coordinates are not recognized.

Now, it should look like on the screenshot. Click Add and a point layer should appear in Nigeria, northeast of Lagos.

enter image description here

14
  • Thank you everyone, I edited my question and added a screenshot where you can see the settings I used and the unavailable new layer called "nest"
    – Amikiri
    Commented Jun 5 at 18:31
  • 1
    1) So can you solve the problem with the solution propesed or not? Not clear from your statement if the problem persists. 2) We can't see anything on your screenshot, it's too small. Please read my answer carefully, use EPSG:4326, not EPSG:3857 and make the exact same settings as on my screenshot. In my case, it worked like this. Be sure to have everything exactly the same.
    – Babel
    Commented Jun 5 at 19:02
  • Hi, no, the problem is still the same. I used the settings you recommended and the layer is there but I can't do anything with it. I made a screenshot how it looks like after I try to add it.
    – Amikiri
    Commented Jun 7 at 14:54
  • Make a screenshot that shows your settings, like my screenshot. Probably there is still a wrong setting. Large enough to see details.
    – Babel
    Commented Jun 7 at 15:14
  • I just did. Thanks a lot for your persitent help
    – Amikiri
    Commented Jun 8 at 10:47

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