Different representations of decimal coordinates out there – how to unify

coordinate systemcoordinatesgoogle mapsopenstreetmapqgis

I have discovered that there seem to be two different versions of decimal coordinate representations in use out there.

Let's show an example:

  • In QGIS the city of Vienna (Austria) is displayed as 1822261.56, 6141734.04 (very high numbers)
  • In OpenStreetMap or Google Maps the exactly same location is displayed as 48.20924484332223, 16.369673184461828

This is seriously an issue, because some applications (e. g. Leaflet) will only accept the decimal numbering of the second variant (OpenStreetMap/Google Maps).

How can I get QGIS to show the coordinates in this more "common" numbering scheme?

Or is this just an issue about wrong georeference or coordinate system preferences?


Update:

I have checked the CRS of all maps as well as the project CRS:

enter image description here
enter image description here
enter image description here


It seems to be correct, no? However, I still do not see the coordinates of OpenStreetMaps or Google Maps.

Best Answer

Solution 1

To solve the problem, right click your basemap layer and set CRS back to EPSG:3857 - the initial one and the only one valid. Do not change layer CRS: See here for details: https://gis.stackexchange.com/a/392388/88814 and https://gis.stackexchange.com/a/383437/88814.

Solution 2

You can also get lat/lon (EPSG:4326) coordinates even if you have another project CRS (e.g. EPSG:3857 to show an undistorted OSM basemap) by right-clicking on the map canvas and selecting WGS84: see second screenshot below.

Explanation

The coordinates that you get are in EPSG:3857 (WebMercator - used for the OpenStreetMap basemap). To get lat/lon coordinates (the one you want), project CRS should be in WGS84 (EPSG:4326).

That is the case in your screenshot. However, with EPSG:4326, the OSM map should look heavily distorted - as on my first screenshot below, but with the correct lat/lon values for coordinates.

Your basemap seems to be undistorted, what is not possible if it is "warped" from it's initial EPSG:3857 (WebMercator, used for most online maps) to the project's EPSG:4326. You (unintentionally) "un-distorted" the basemap by assigning layer CRS EPSG:4326 - it looks undistorted, but like this, places on the OSM basemap are misplaced. You "streched" the OSM map to a very huge extent that goes much beyond the min/max extent for EPSG:4326, so you get wrong coordinate values. See the link above for details.

By the way, be aware: most online maps (like Google, Bing, OSM etc.) use EPSG:3857 for map display, but coordinates are shown in EPSG:4326 to comply with common practice of using lat/lon values (e.g. GPS). This can be quite confusing.

Screenshot 1: with project CRS EPSG:4326, the OSM basemap looks like this - warped (cf next image), but the coordinates show the correct lat/lon values:

enter image description here

*Screenshot 2: project CRS in EPSG:3857, but showing coordinates in EPSG:4326 (WGS84, lat/lon) by right-clicking on the map canvas. In the coordinates field at the bottom, it still shows the coordinates in project's CRS, here EPSG:3857: * enter image description here