1

I have imported a .shp file (Layer --> Add Layer --> Add Vector Layer) and want to get the latitude/longitude of the points in this file. (It's a file of world coastlines).

I ran Vector --> Geometry Tools --> Extract Nodes and have a nice outline. I even see the correct corrdinates in the QGIS window:

enter image description here

However, when I try to save that new file as a CSV, the X/Y coordinates are a weird format:

X           Y
-3817908    18432293
-3826512    18426524
-3840126    18409838
-3859723    18368052
-3867249    18359913
-3876943    18362476
-3912276    18386416
-3941774    18394507

Instead of the GPS coordinate type, i.e. -115.00, 49.82.

Even if I try to edit the fields, and add a new one for $x or $y, it shows the 'incorrect' number:

enter image description here

What's odd is I followed these exact steps on another Node file (that ne_10m_nodes), and it does show the correct format.

What could I be doing wrong?

(Note: the data source for the .shp file is different in the 'broken' and 'working' one, but after I get the nodes extracted, wouldn't think that makes a difference...)

6

The coordinates you are showing looks like Web Mercator, and are in meters. Your source data is likely in this projection, and so is the output.

On the screen you see that lat/long coordinates because you have enabled "On The Fly reprojection" (the OTF letters beside the project coordinate system at the bottom right of the GUI).

If you want the lat-long, you can right click the layer, select save as and specify the WGS84 coordinate system (EPSG 4326)

enter image description here

  • Aha! Thanks so much for your quick reply, that was it! :D (Just curious, what did the meters refer to? Distance from some central point? If so, is that the same central point as the lat/lon?) – BruceWayne Jan 10 '18 at 19:23
  • 1
    @BruceWayne 0;0 is the intersection of the equator and prime meridian, so the coordinates are X meters from prime and Y meters from the equator epsg.io/3857 – JGH Jan 10 '18 at 19:36
  • ... but note that these are not real meters, because x is only correct at the equator, and y of the poles is somewhere in infinity. – AndreJ Jan 11 '18 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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