Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

The discussion at What is the difference between WGS84 and EPSG4326? shows that 4326 is just the EPSG identifier of WGS84..

Wikipedia entries for Google Maps and OpenStreetMap shows that they both use WGS 84.

http://wiki.openstreetmap.org/wiki/EPSG:3857 states that

EPSG:3857 is a Spherical Mercator projection coordinate system popularized by web services such as Google and later OpenStreetMap.

Leaflet's help states:

EPSG3857 The most common CRS for online maps, used by almost all free and commercial tile providers. Uses Spherical Mercator projection. Set in by default in Map's crs option.|

EPSG4326 A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.

This is confusing - it seems that Google Maps and OpenStreetMap use EPSG3857 but they use WGS84 which 'is' EPSG4326. Something can't be right here, most likely my understanding.

Could someone help me understand?

share|improve this question
add comment

2 Answers

up vote 29 down vote accepted

There are a few things that you are mixing up.

  • Google Earth is in a Geographic coordinate system with the wgs84 datum. (EPSG: 4326)

  • Google Maps is in a projected coordinate system that is based on the wgs84 datum. (EPSG 3857)

  • The data in Open Street Maps database is stored in a gcs with units decimal degrees & datum of wgs84. (EPSG: 4326)

  • The Open Street Map tiles and the WMS webservice, are in the projected coordinate system that is based on the wgs84 datum. (EPSG 3857)

So if you are making a web map, which uses the tiles from Google Maps or tiles from the Open Street Map webservice, they will be in Sperical Mercator (EPSG 3857 or srid: 900913) and hence your map has to have the same projection.

Edit:

I'll like to clarify the point raised by mkennedy

All of this further confused by that fact that often even though the map is in Web Mercator(EPSG: 3857), the actual coordinates used are in lat-long (EPSG: 4326). This convention is used in many places, such as:

  • In Most Mapping API,s You can give the coordinates in Lat-long, and the API automatically transforms it to the appropriate Web Mercator coordinates.
  • While Making a KML, you will always give the coordinates in geographic Lat-long, even though it might be showed on top of a web Mercator map.
  • Most mobile mapping Libraries use lat-long for position, while the map is in web Mercator.
share|improve this answer
    
Just to add, EPSG:3857 calls its units metres, but they are not real metres. The more to the north you come, the more squeezed they are. –  Andre Joost Jan 24 '13 at 7:38
2  
What's also confusing is that you often interact with Google Maps or Bing Maps using EPSG: 4326, for instance in KML files. Internally the servers convert the data to their equivalent of EPSG: 3857. If you're mashing up data against one of their tiles, the tile is using EPSG: 3857 so it's faster for you to convert your data to that first. –  mkennedy Jan 24 '13 at 20:36
    
Does this mean that when calculating the projection values, it is safe to use OSM for Google Maps? Such as converting lat to y: wiki.openstreetmap.org/wiki/Mercator#Spherical_Mercator –  brendan Jun 3 '13 at 23:04
2  
@brendan: Yes. you can use the same coordinates for OSM, as well as Google Maps (as well as many others including Bing, here etc.) –  Devdatta Tengshe Jun 4 '13 at 2:43
1  
@EtienneDesgagné: Yes –  Devdatta Tengshe Aug 6 '13 at 13:51
show 1 more comment

In gist:

EPSG: 4326 uses a coordinate system on the surface of a sphere or ellipsoid of reference.

EPSG: 3857 uses a coordinate system PROJECTED from the surface of the sphere or ellipsoid to a flat surface.

Think of it as this way:

EPSG 4326 uses a coordinate system the same as a GLOBE (curved surface). EPSG 3857 uses a coordinate system the same as a MAP (flat surface).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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