I have a shapefile and I loaded it into QGIS using 'Add vector layer'.
After that, I can see points in different positions.
I open the Attribute table and I can see columns "X"
and "Y"
with values such as (151449.965057
, 204642.790761
). Now I want to convert them to latitude and longitude. How can I do that?
Therefore, I use the option 'Save as' to export the data to CSV format using the CRS WGS 84.
However, nothing changes in the CSV file ("X"
and "Y"
stay the same as the original data).
I read and tried several suggestions from this forum without help, e.g., Converting x,y coordinates to longitude,latitude using QGIS.
Best Answer
Before exporting there are several more steps have to be applied.
Step 1. Create two additional fields, i.e.
"lat"
and"long"
via the Field CalculatorStep 2. Apply the following expressions for
"lat"
and"long"
respectivelyFor
"lat"
:For
"long"
:or alternatively, you can already use your
"X"
and"Y"
fields withFor
"lat"
:For
"long"
:Additionally, I may refer you to this article: Adding x,y coordinates to Attribute table in QGIS.