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 Map 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)
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)
- 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.
- Exception is openlayers. You have to convert from lat,long (EPSG:4326) to x,y (EPSG:3857) before you feed into openlayers api.
EPSG:3857 references the same DATUM, SPHEROID, PRIMEM and UNIT fields as the 4236 projection. It also defines a PROJECTION (Mercator_Auxiliary_Sphere) which defines how to project the 3D GEOGCS coordinates into 2D coordinates. 4326 is the most common spatial reference for storing a referencing data across the entire world. It serves as the default for both the PostGIS spatial database and the GeoJSON standard. It is also used by default in most web mapping libraries. Because of its use in GPS, 4326 is generally assumed to be the spatial reference when talking about "latitude" or "longitude".
Contrary to some descriptions, the earth is not a sphere, nor is it a spheroid, nor is it an ellipsoid. These approximations can be useful, but in reality the earth is its own crazy wonky lumpy shape that is constantly changing in four dimensions with mass movements and human behavior. It also has inconsistent density (and thus an inconsistent gravitational pull), making it even harder to model.The real shape of the earth is too complex to be useful as a reference for measurement. Instead, we use a reference ellipsoid as an approximation of the surface of the earth. A reference ellipsoid is a mathematically-defined surface that roughly matches the model of the earth when its topographical features are removed (the lovely lumpy geoid, a model of the earth with assumed equal density). There is not a single canonical ellipsoid that is used to measure the earth at every location. Because a reference ellipsoid is an approximation, there are locations where an ellipsoid exactly matches the geoid and there are locations where an ellipsoid is way way off. In some of these locations, a different reference ellipsoid is used that better matches the earth’s surface at those locations.
Datums, on the other hand, are geographic coordinate systems based on a specific ellipsoid (so a more specific geographic coordinate system), with an origin at a specific location, and the ellipsoid at a specific orientation. These are also called “spatial reference systems” or “coordinate reference systems.” Datums are super important: every map and spatial dataset has one, and there are multiple datums that are commonly used in different locations on the planet. Some of these datums are accurate only in certain locations in the world, as the ellipsoid they’re using is a great fit for the real earth surface in those locations, but may be way way off in other places.
I used this site to convert 4326 to 3857 and also note this only helps if you know if it's either 3857 or 4326, there are loads of SRIDs
It's confusing when an API says it uses SRID 3857 but gives a location using SRID 4326. Quick way of telling what SRID your lat/lon is in: Look at how big the number & the precision
EPSG:4326 is in degrees - 3D sphere
EPSG:3857 is in metres - 2D projection
If I say Paris is:
A) Lat(48.8589506) Lon(2.2768485)
B) Lat(6250962.06) Lon(253457.62)
Given a choice of the two SRIDs above
A) is clearly in degrees, the numbers are small and there's loads of decimal places (48m from equator/2m from greenwich meridian would make Paris a tropical GMT+0 place, but my general knowledge says Paris is temperate and on CET) so SRID is 4326
B) both values are well over the max value for the unit to be degrees, it must be metres so the SRID is 3857