I am trying to use data imported through one of the google maps/Bing API, and am confused about the projection. Using the APIs, data comes under a non-geographic format, such as json or xml, try:


It seems that the projection of google maps is epsg:3857. However, according to this stack post and this page, things are more complicated:

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).

So what should I do, when I import a point, and want it, say in the final projection WGS 84 (epsg:4326)? I tried:

  1. Declaring as 3857, then converting to 4326: gives me a point out of space (see point_3857_to_4326 in code below: -0.00109, 0.00034)
  2. Declaring directly as 4326: seems to make sense (see point_4326)

Where is the issue? That the points themselves are not in 3857, or that they are, but conversion is not well done? This post indicates in chapter "the solution" how to do the conversion, but I just don't get it...

Example with R:

# not run: library(ggmap)
# geocode("Davis", output="latlon")

point <- st_point(c(-121.7405167, 38.5449065)) 

point_4326 <- st_sfc(point, crs=4326)
point_3857_to_4326 <- st_sfc(point, crs=3857) %>%

  • KML (KMZ) files are always WGS84/Geographic en.wikipedia.org/wiki/Keyhole_Markup_Language section Geodetic reference systems in KML and docs.opengeospatial.org/is/12-007r2/12-007r2.html section 6.2. Even though Google Earth/Maps are shown in Web Mercator the KML file must use WGS84/Geographic. Commented Feb 14, 2018 at 23:06
  • gis.stackexchange.com/questions/271504/… ! Note however that the data doesn't come under a geo format such as kml/kmz, just xml or json.
    – Matifou
    Commented Feb 14, 2018 at 23:12
  • geojson.org/geojson-spec, section 3: The default CRS is a geographic coordinate reference system, using the WGS84 datum, and with longitude and latitude units of decimal degrees, so if not specified otherwise it will be WGS84/Geographic... considering the engine is built to store in KML/KMZ export of the other formats in the same CRS is logical. Data stored in non-geographic format (JSON, XML) is aspatial and thereby has no CRS. Commented Feb 14, 2018 at 23:30

1 Answer 1


Google Maps and similar products all use EPSG:3857 (Spherical Mercator, aka "Web Mercator") to display their maps in browsers and the like. Services that also offer bitmap tiles are likely in EPSG:3857 as well. Why: it's a decent projection if you want the "world" to display like people expect it to be.

The APIs, kmz, kml files, and the like of these use lat,lon coordinates. Those are in EPSG:4326 (aka WGS84).

So these services do a behind the scenes re-projection.

Some interfaces actually use both coordinate systems in one URL, but that's a bit rare AFAIK: e.g.: http://historicalmaps.arcgis.com/usgs/index.html?lat=38.89872390784443&lng=-77.03654999999998&zl=17&minDate=1885&maxDate=1993&oids=&dlids=&f=&clickLat=-8575667.726977706&clickLng=4707013.772000514

[it's the white house]

has both in there: lat=38.89872390784443&lng=-77.03654999999998 in WSG84 for where to center the image and clickLat=-8575667.726977706&clickLng=4707013.772000514 (which I suspect being 3857 - or something similar) where I clicked (more or less in the center).

  • 1
    4269? 4326 surely?
    – Spacedman
    Commented Feb 15, 2018 at 9:13
  • 4326 was intended indeed, stupid cut&paste.
    – user59365
    Commented Feb 15, 2018 at 16:07
  • Just for those interested in the discussion in the comments about the difference between EPSG:4269 and EPSG:4326 see here for a more detailed explanation on the difference - and the level of accuracy you need in order to care or not: gis.stackexchange.com/questions/170839/…
    – user59365
    Commented Feb 17, 2018 at 1:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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