2

I am trying to add point data to a project in a delimited text layer. The lat/long values appear in the attribute table of the new layer but they do not map as points.

I have looked for answers here first. Based on these, I made sure the CRS of all layers in the project matched and that I entered the x field as the longitude field in my csv and the y field as the latitude. Still, no success. I get the same results trying to import the coordinates as a number or as string, with the "decimal separator is comma" checked or not. I've also tried another similarly formatted file but without trailing zeros (taking a stab in the dark!)

What else should I be doing?

I'm including pictures of my data source manager window, attribute table, and a sample of my data as it appears in the CSV, in case that helps to see.

clarifying edits below:

I've re-loaded it with "Decimal separator is comma" unchecked, and as with previous attempts doing so, it hasn't made a difference. I will continue to leave it unchecked when trying other solutions.

When it is unchecked, and I view the attributes table, there are only null values for the latitude and longitude fields when I try to import with those fields set to decimal numbers. When it is unchecked, the actual values from the CSV only show up when I try to import them as string data.

It always appears in my layers panel and there are sometimes lat/long values in the the attributes table, depending on the selections I make when initially importing, described above.

It's the topmost layer, and I can't see points. I'm not able to zoom to the layer, that option doesn't appear in the menu when I right click. It has a 0 feature count, while the CSV has 1334 points.

I have added images of my layers panel and the map canvas below those in my initial post.

epa_id,site_latitude,site_longitude
CTD980732333,‭41.893947‬,‭-72.989337‬
CTD072122062,‭41.431950‬,‭-73.035281‬
CTD001452093,‭41.481110‬,‭-72.681388‬
CTD108960972,‭41.665281‬,‭-71.924161‬
CTD980670814,‭41.130550‬,‭-73.431950‬
CTD980521165,‭41.476939‬,‭-73.071661‬
CTD001153923,‭41.940561‬,‭-71.966939‬
CTD980906515,‭41.400139‬,‭-72.087081‬
CTD051316313,‭41.849750‬,‭-72.447911‬
CTD001186618,‭41.201278‬,‭-73.117222‬
CT0002265551,‭41.550389‬,‭-73.010639‬
CTD009717604,‭41.619600‬,‭-72.878000‬
CTD009774969,‭41.669450‬,‭-71.964161‬
MAD001026319,‭41.635561‬,‭-70.894450‬
MAD001041987,‭42.149719‬,‭-71.028611‬
MAN000106144,‭42.074417‬,‭-71.410806‬
MAD982191363,‭42.138749‬,‭-71.251667‬
MAD003809266,‭42.669450‬,‭-71.443339‬
MAD001031574,‭42.553111‬,‭-70.926722‬
MA7210025154,‭42.536111‬,‭-71.596111‬

enter image description here

enter image description here

enter image description here

enter image description here

8
  • 5
    Uncheck "Decimal separator is comma".
    – Pointdump
    Commented Nov 5, 2022 at 6:59
  • 1
    I can't see anything obvious wrong with your csv or import settings. Could you show what your map canvas and layers panel looks like. Have you tried right clicking on the layer name and Zooming to the layer? What about layer order? Is there a raster on top of your point layer?
    – Ben W
    Commented Nov 5, 2022 at 8:07
  • 1
    But QGIS load something? Do you have the data in TOC and you have data in the attribute table? Or nothing happens?
    – katagena
    Commented Nov 5, 2022 at 9:10
  • @BenW, I responded to your questions in my edits, thanks for your help!
    – seashelll
    Commented Nov 5, 2022 at 16:51
  • @katagena, I responded to your question in my edits, thanks for your help!
    – seashelll
    Commented Nov 5, 2022 at 16:52

1 Answer 1

1

There's some sort of invisible character in front of and in back of each latitude and longitude. If you put that file into Excel and save as a CSV, you'll see a "?" before and after each latitude and longitude:

"CTD980732333,?41.893947?,?-72.989337?"

You can then scrub the "?" and you'll have a usable file.

1
  • 1
    Brilliant, that took care of it! Everything looks how I'd expect it to now.
    – seashelll
    Commented Nov 6, 2022 at 0:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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