0

I understand Google Maps is projected to Web Mercator to calculate distances in meters, EPSG 3857. Does the Google Maps geocoding API also return EPSG 3857 lat/lon data? Or does it return EPSG 4326 lat/lon data in decimal degrees? There are a lot of threads on here about the projection Google Maps uses, but there seems to be either disagreement, or several simultaneous discussions about the definitions of datums, CRS's, and projections. Ultimately I just want to geocode a few addresses, extract lat/lon degrees, and load them into R..

So is it the case that Google Maps shows a Web Mercator projection EPSG 3857 visually but then returns raw data in EPSG 4326 form when queried using ggmap::geocode() in R? My results are in decimal degrees.

From what I understand EPSG 3857 roughly transforms and contorts a globe into a square and then represents lat/lons as thousands of meters from an origin point (lower left of map?) instead of angular degrees. Whereas EPSG 4326 just expresses everything in terms of angular lat/lon degrees, and isn't projected, even if geospatial R packages can work with the projection (I assume by...transformation to a projected CRS internally?).

I've done my reading on here, but the answers below are confusing to me:

In this thread, the first comment contradicts the answer, suggesting coordinates return in 4326 while the accepted answer says 3857.., and then goes into a discussion about what a datum is:

In what coordinate system and unit measures the coordinates returned by the Google Maps API are?

This thread seems to suggest the map tiles are rendered in Web Mercator 3857 while the decimal degree lat/lons raw values returned are EPSG 4326:

EPSG 3857 or 4326 for GoogleMaps, OpenStreetMap and Leaflet

"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.". i.e. Users query with or receive lat/lon degrees.

This blog also seems to indicate that there's also some potential misalignment issues with Google Maps beyond just what the projection is

I know what a datum/spheroid/CRS/projection is, but I still struggle to see what CRS/projection is I should apply to the raw lat/lon data I receive from Google in decimal degree form when I call the geocoding API from R. I think it's safe to assume EPSG 4326 is kosher, but I'm not positive.

Here is the link to Google Maps API Lat/Lon lookup function that I'm using: https://developers.google.com/maps/documentation/geocoding/start?csw=1

Here is the documentation for the R function I'm using: https://www.rdocumentation.org/packages/ggmap/versions/2.6.1/topics/geocode

  • 2
    If coordinates are in 3857, they're projected and will be in meters. For Google, if it says it's lat/lon, it's in decimal degrees and more-or-less WGS84. – mkennedy Aug 21 '18 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.