1

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.

7
  • 2
    I suppose when you say "QGIS displays" you refer to the small coordinate window, which shows the coordinates of the current position of the mouse on your map screen. This can be changed under project -> properties -> general tab.
    – Erik
    Sep 13 at 7:40
  • 3
    these are different coordinate systems - look for questions that mention EPSG:4326 and EPSG:3857
    – Ian Turton
    Sep 13 at 7:53
  • 1
    Too add to what @Ian Turton mentioned: please tell us what project CRS and what layer CRS you have.
    – Babel
    Sep 13 at 8:28
  • 1
    There are actually thousands of coordinate reference systems in regular use every day, and an infinite number of Well-Known Text description strings available to describe most of the known coordinate reference systems. And this is a good thing, because we can all share data without without forcing anyone to use an inappropriate CRS.
    – Vince
    Sep 13 at 10:21
  • @Babel: I have attached screenshots to my question. It seems to be fine, no? However, I still do not see the coordinates of Google Maps or OSM.
    – Dave
    Sep 13 at 20:09
4

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

1

Google map APIs use format for a point as (Latitude,Longitude) which is also exquallent to (Y,X)

Openlayers APIs use the other way around like (Longitude, Latitude) or(X,Y) format.

QGIS uses coordinates depending on your settings configured.

2
  • 2
    OSM may use Lon-Lat in some services but for example the main OSM map is using Lat-Lon links. See Paris openstreetmap.org/#map=8/48.645/2.966.
    – user30184
    Sep 13 at 12:09
  • 1
    Thank you for the update user30184. I corrected the information I shared. Sep 13 at 13:30

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.