4

I'm having trouble importing a CSV file as a points layer. I have done this many times in the past but I think some setting has changed. QGIS no longer autodetects the appropriate x/y fields, and even if I choose them, it adds it as a table and not a point layer.

I have two types of CSVs. One works, one doesn't.

The first (the one that works) is comma separated, with no quotation marks around each entry.

And the type that doesn't work is comma separated but has quotations around each entry - "xxx","xxx" example here:

"Name","UTM Easting","UTM Northing","Colour","Remarks","Image File Name","Size","Activity","Location","Unit","Time","Equipment","Date","Altitude Meters","MGRS","Lat/Lon DD","Lat/Lon DMS","UTM","UTM Zone","Image path"
"Y 4","367984‎","6152970","yellow","","","","","","","","","2025年01月24日T05:30:35.462Z","1,450 m MSL","10U‎ CG‎ 67984‎ 52970","N‎ 55.50496°‎ ‎ W‎ 125.09025°","N‎ 55°‎ 30'‎ 17.87""‎ ‎ W‎ 125°‎ 05'‎ 24.90""","10U‎ 367984‎ 6152970","10U‎",""
"Y 5","434641‎","6160969","yellow","","","","","","","","","2025年01月24日T05:30:35.926Z","873 m MSL","10U‎ DG‎ 34641‎ 60969","N‎ 55.59029°‎ ‎ W‎ 124.03703°","N‎ 55°‎ 35'‎ 25.05""‎ ‎ W‎ 124°‎ 02'‎ 13.31""","10U‎ 434641‎ 6160969","10U‎",""
"Y 6","442674‎","6097619","yellow","","","","","","","","","2025年01月24日T05:30:36.605Z","1,214 m MSL","10U‎ DF‎ 42674‎ 97619","N‎ 55.02211°‎ ‎ W‎ 123.89666°","N‎ 55°‎ 01'‎ 19.60""‎ ‎ W‎ 123°‎ 53'‎ 47.97""","10U‎ 442674‎ 6097619","10U‎",""
"Y 7","371544‎","6096743","yellow","","","","","","","","","2025年01月24日T05:30:37.085Z","908 m MSL","10U‎ CF‎ 71544‎ 96743","N‎ 55.00097°‎ ‎ W‎ 125.00829°","N‎ 55°‎ 00'‎ 03.49""‎ ‎ W‎ 125°‎ 00'‎ 29.86""","10U‎ 371544‎ 6096743","10U‎",""

What settings must I change in order for it to autodetect the x/y fields and add it as a point layer for the .csv with the quotations? The coordinates im using is the UTM easting and UTM northing columns.

Vince
20.5k16 gold badges49 silver badges65 bronze badges
asked Jan 24 at 5:53

1 Answer 1

4

If you have copy-pasted the CSV data correctly, it seems to contain invisible control marks, "left-to-right mark" LRM https://unicode-explorer.com/c/200E

enter image description here

The first thing to do is to clean the data.

answered Jan 24 at 7:03
5
  • can you tell me how i would clean the data? Commented Jan 24 at 16:13
  • Im using Libre Office Calc. Is the "LRM" in your screenshot of my text showing up for you when pasted into another program? Wondering why i dont see that on mine I copy and pasted this text from a "mousepad" on a linux system Commented Jan 24 at 16:19
  • 1
    You can remove via commandline col -b < bad.csv > clean.csv Commented Jan 25 at 8:40
  • I pasted the CSV text from your question and pasted it into Notepad++. The hidden LRM marks are shown when the option "Show all characters" is used. By default Notepad++ does not show the hidden characters and many text editors cannot show them at all. Libre Office seems to have some configuration option for left-to-right/right-to-left ask.libreoffice.org/t/changing-back-and-forth-rtl-and-ltr/52739. Commented Jan 25 at 14:25
  • 1
    @boreal LibreOffice Calc can't show nonprinting characters. If you open in a programming text editor like Visual Studio Code you'll see them (in VS Code they display as [U+200E] but they're the same nonprinting LRM character. Just remove via my commandline method above. Commented Jan 26 at 2:23

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.