Because it’s quite a pain to have to keep quoting this complete set of parameters, every system is commonly referred to by a unique integer code (also called it’s SRID) instead. The set of SRIDs assigned to spatial reference systems in mainstream usage was originally set up by the European Petroleum Survey Group, and they are generally referred to as EPSG codes.Hi, I am trying to convert from WGS84 UTM Zone 50S to OpenStreetMap (EPSG 3857) using Proj.Net. My input are : X=285970.67279052734 and Y=9100209.1314086914.

- thanks for this post! I am trying your fixed projection with the ogr2ogr-tool. I am converting from EPSG:31468 but the tool says that there is “No translation for Mercator to PROJ.4 format is known”. Please see this page for the full output: https://gist.github.com/bilke/7942425
- The problem is that neither of these really describes the Google / Bing Maps projection, in which the underlying geographic coordinates are defined using WGS84 (as in 3857), but projected as if they were defined on a sphere (as in 3785).
- To me the 2 pieces of code that convert from Google to WGS84 have a great value, more than all newsgroups i have read about all this. But in addition to that, i have to convert between NAD27, NAD83, GWS84. Do you please have similar recipes ? Otherwise my only option is to check the corrections written on paper maps, and store, map-by-map, these corrections.
- r27594 does not seem to fix the display offset problem when viewing a GDAL/ORG-produced EPSG:3857 GeoTIFF or Shapefile in an ESRI application, such as ArcMap?.
- However, unless you’re using a conversion library that has been specifically designed to handle the special case of the Bing Maps / Google Maps projection, you’re also going to have to provide a little bit more information to explain that the projection should occur from the sphere rather than the WGS84 ellipsoid specified in the geographic coordinates system. That additional information can be supplied in different ways:
- Hi – I am a typical GoogleMaps user taht you describe and not a GIS professional – I’m a PhD student just learning to use ArcGIS. I have a problem working between the two – I don’t know how to apply the 3857 code you discussed.

Hi Alastair I am one of those users that just need a map transformation as a one off without knowing enough about projections. I need to transform a bing map into utm. Feeling very stupid – but in the two sets of formulas you provided, what are x and y? they are too large for conversion factors, too large for being lat/long in wgs84, and not correct for being x and y in utm… Sorry for the stupid question, but your help is much appreciated, thanks! Well, but that semiminor axis is used only to specify the ellipsoid shape for the underlying geodetic datum (which is WGS84, so not spherical). However, the projection method Mercator_Auxiliary_Sphere will ignore the flattening and just use spherical formulas.

- I just looked a little bit at your other posts in this blog and saw that you are working with Unity and terrains as well. To explain my motivation for the comment a little more: I am working in environmental research center and I am trying to combine Unity terrains created with WorldComposer / TerrainComposer (http://www.terraincomposer.com, which rely on Bing map data) with data from GIS. Therefore I try to convert the shape-date into the Bing coordinate system / projection. Do you have any experience in combining Unity with GIS data?
- 1. The sort of people that visualise data on Google Maps / Bing Maps are (typically) not GIS professionals. This comment is not in anyway meant to belittle the quality of their data or output. However, the fact is that most GIS professionals still use the commercial (expensive) ESRI ArcGIS product set, and free tools such as Google / Bing are always more likely to attract casual spatial developers. As such, these developers are less likely to know (or want to know) about things like datums, coordinate systems, projections – they just want a map that works.
- * Original file in WGS 84 (EPSG:4326), but with the bottom 0.4 degrees of Antarctica trimmed off. You should be able to reproject this file without issue: https * Same file, but reprojected into Web Mercator (EPSG:3857): https..

Coordinate systems are defined using a set of parameters, including the type of projection used (Mercator, Albers etc.), coordinate offset (False Easting, False Northing), the unit of measurement (Metre, Foot etc.), the underlying datum (WGS84, NAD27 etc.) and many more.For John Hutchinson below (no reply button): This quote from the Matrix is helpful in understanding Web Mercator. You are commenting using your Facebook account. ( Log Out / Change ) The projection parameters defined above for EPSG:3785 describes a Mercator projection of geographic coordinates defined on a spherical model of the earth, of radius 6,378,137m, as specified on the following line:

- Yep – you can’t plot a point at the poles in the Mercator projection. In fact,, Google/Bing Maps are both clipped so that the latitude only ranges between -85.05112878 to 85.05112878.
- I’m having some precision issues between bing and google maps. I’m finding an 17m distance position difference between them for the same lat/lon coordinates. For instance, the center of the round about in this bing map http://binged.it/15fx4s3 gives the coordinates 40.232744, 0.272125. If I copy/paste the same numbers in google maps, the marker is mispositioned by 18m approx. Is it normal? I’m a bit confused. Thank you in advance.
- For web, mobile and desktop applications. Integrate our map services in your application quickly and easily. Example map in EPSG:3857 - WGS 84 / Pseudo-Mercator. The box shows the covered area of the coordinate reference system according to the EPSG database
- Leaflet: panTo Web Mercator coordinates (EPSG 3857) Ask Question Asked 6 years, 10 months ago Active 4 years, 8 months ago Viewed 6k times .everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0; } 7 1 I have a standard leaflet map showing a tile layer. Now leaflet only lets you use panTo method using LatLng for example,
- PROJCS["Popular Visualisation CRS / Mercator", GEOGCS["Popular Visualisation CRS", DATUM["Popular Visualisation Datum", SPHEROID["Popular Visualisation Sphere", 6378137, 0, AUTHORITY["EPSG",7059]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY["EPSG",6055]], PRIMEM["Greenwich", 0, AUTHORITY["EPSG", "8901"]], UNIT["degree", 0.0174532925199433, AUTHORITY["EPSG", "9102"]], AXIS["E", EAST], AXIS["N", NORTH], AUTHORITY["EPSG",4055]], PROJECTION["Mercator"], PARAMETER["False_Easting", 0], PARAMETER["False_Northing", 0], PARAMETER["Central_Meridian", 0], PARAMETER["Latitude_of_origin", 0], UNIT["metre", 1, AUTHORITY["EPSG", "9001"]], AXIS["East", EAST], AXIS["North", NORTH], AUTHORITY["EPSG",3785]] (As an aside, the projection was listed on the EPSG registry with an accompanying note reading “It is not a recognised geodetic system”).

This same discrepancy appears across a whole variety of conversion tools – some returning the first result, and some returning the second (which lines up correctly with Bing / Google Maps). So, which is right? I believe this issue has affected customers using GDAL to reproject files to 3857 ... the resulting WKT is misinterpretted by ArcGIS causing displacement errors.

“KT1 1AA” Original:518032,169094 TDPG.GeoCoordConversion.GridReference Proj.net:-33878.8926521592,6693890.38230938 **Web** **Mercator** mathematics are formulated on a spherical assumption of the earth which conflict with the defined WGS 84 ellipsoid reference system. Other terms for **Web** **Mercator** include, but are not limited to, WGS 84 **Web** **Mercator**, WGS 1984 **Web** **Mercator** (**Auxiliary** **Sphere**) and **EPSG:3857**

WGS_1984_Web_Mercator_Auxiliary_Sphere WKID: 3857 Authority: EPSG Projection: Mercator_Auxiliary_Sphere False_Easting: 0.0 False_Northing: 0.0 Central_Meridian: 0.0 Standard_Parallel_1: 0.0 Auxiliary_Sphere_Type: 0.0 Linear Unit: Meter (1.0) Geographic Coordinate System: GCS_WGS_1984 Angular Unit: Degree (0.0174532925199433) Prime Meridian: Greenwich (0.0) Datum: D_WGS_1984 Spheroid: WGS_1984 Semimajor Axis: 6378137.0 Semiminor Axis: 6356752.314245179 Inverse Flattening: 298.257223563 Thus the following proj4 string can be used to reproject to what ESRI expects: This information is almost sufficient to guide a stable GDAL implementation. PROJ4 too. Superfluous parameters may be eliminated, or not. An excellent article that has confirmed some of the issues I suspected. It explains anomalies in using Google and MS Bing maps rather than software that employs UK OS standards, transforms and projections. Many thanks. Martin Worrall, QinetiQ.

What I think you’re trying to argue is that the decision to use spherical Mercator equations makes Google Maps / Bing Maps et. al unsuitable for serious scientific purposes, but I don’t think anyone would disagree with that 🙂 SR-ORG Projection 7483 - EPSG:3857 -- WGS84 Web Mercator (Auxiliary Sphere). Projection used in many popular web mapping applications (Google/Bing/OpenStreetMap/etc). Sometimes known as EPSG:900913 Hi alastaira, thank you very much for your answer. I agree that 18m is not a big deal, maybe it’s a matter of precision, but as you comment, a third source matches exactly one of them. Indeed the GIS software I use also matches the bing maps location, so I would dare to say that google maps is wrong by 18m, I wouldn’t expect that “error” from google maps. I tried different positions around that area and all of them have the same amount of offset in the same direction (always East, North is correct), it’s not just random. I found out that this missmatching doesn’t take place in other cities that I checked and maybe it will be corrected on the next render/process of the google maps tiles. Do you think it would be worthy to notify the people working on google maps?

**The Web Mercator / Pseudo Mercator projection is a cylindrical map projection**. This is a variant of the regular Mercator projection, except that the computation is done on a sphere, using the semi-major axis of the ellipsoid. #transform to EPSG3857 (Web Mercator PROJECTION). cornersEPSG3857 <- spTransform(cornersEPSG4326, CRS(+init=epsg:3857)). #say that polygon is EPSG3857 (Web Mercator PROJECTION). proj4string(finalPolygon) <- CRS(+proj=merc +a=6378137 +b=6378137.. Hi Alastair, many thanks for the quick reply. I did realize that this blog did not include UTM – but once I got WGS84 geographic I should manage to further convert to UTM. it is the part Web Mercator – WGS84 that I need. I don’t understand what x and y are, i.e. what the units are. The information I get when downloading a bing map is also lat /lon in degrees but x and y seem to be much larger numbers if I convert lat lon from Mercator WGS84 to Web Mercator.

You can confirm this by using the online tool at http://www.synectics-tc.com/resources/downloads/coordinate-reprojection.html which is based on the Proj.NET library. (Note, however, that this still uses the outdated 3785 code to refer to the projection).var source = new Proj4js.Proj('EPSG:3857'); var dest = new Proj4js.Proj('EPSG:4326'); var p = new Proj4js.Point(-9096106.74,3679364.68); //this takes x,y Proj4js.transform(source, dest, p); this.map.setView(new L.LatLng(p.y, p.x),zoom); But this is still not an ideal solution as it taxes me a Megabyte for for including the library. I am still looking for a leaflet solution. Knowing that internally leaflet already uses EPSG:3857 to fetch tiles, this shouldn't be this difficult.Hello, I need to convert the SRID 4326 to 3857. But I can not find the SRID 3857 sys.spatial_reference_systems in the reference table. Could you help me?

Yes – I’ve used GIS data in Unity a little – specifically GB Ordnance Survey data. As this is already projected in Eastings/Northings expressed in metres, it was pretty straightforward to import into Unity (which, although not explicitly documented, is generally assumed to have a scale in which 1 unit = 1 metre). I added an offset to all coordinate values so that (0,0,0) in Unity worldspace corresponded to my desired origin (Norwich, which is about 623000,308000 in OSGB) and kept scale the same.PROJCS["WGS 84 / Pseudo-Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_Auxiliary_Sphere"], PARAMETER["central_meridian",0], PARAMETER["standard_parallel_1",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["X",EAST], AXIS["Y",NORTH], AUTHORITY["EPSG","3857"]] Applications which depend on the WKT (e.g. MrSID) to expose the SRS will see improved recognition. I've verified the results in QGIS, ERDAS and ArcGIS. The above WKT is also incorrect for 3857. Because its using an ellipsoid that’s a sphere, the 298.257223563 value is wrong, because this makes the WebMercator projection use a datum that has a flattening. Instead enter “0” here to make it a sphere. The “semi_minor” parameter for Mercator is not really needed, and I doubt most projection engines would know what to do with that (they should pull the value from the ellipsoid instead). The ones that use it I think is using a hack for WebMercator, instead of properly implementing the datum-transform. In this case the datum transform is really easy: you don’t really have to do anything, since it shares same scale, center and orientation as WGS84, so the TOWGS84 parameter would contain all zeros. However in many cases the TOWGS84 parameter is important, since this tells the projection engine how to perform the datum shift (often they will just skip this step without it, kinda like what happens with proj.4 without the nadgrids ‘hack’)Issue 1.) really needs no explanation – as spatial data becomes more mainstream, it is inevitable that new developers will want to start doing things with spatial data, and displaying it on a Google Map / Bing Map is typically one of the very first things you might attempt. These tools both offer great, intuitive UIs to navigate and analyse spatial data, and seeing as WGS84 is by far the most prolific source of data, it seems reasonable to expect that conversion from WGS84 <-> Bing / Google should not be too hard to do.In ESRI software, it’s easy enough to transform data from WGS84 to any spherical projection – but not the reverse. So the transformation to Web Mercator for Bing/Google Maps is a one way ticket in that environment, for now. Many thanks – best discussion of this topic on the Web.

SPHEROID[“WGS 84”, 6378137, 298.257223563, AUTHORITY[“EPSG”,”7030″]]The exception is “Expecting (‘PROJECTION’) but got a ‘UNIT’ at line 12 column 61.”This is quite simple to to in Openlayers as once you define a map projection everything works in that projection. But Leaflet always works on latlng on the outside. The problem that arose was, with no official body to oversee the standard, many different variations appeared – all generally using the same parameters, but with different naming conventions etc., and these had to be manually added into any databases that were otherwise generally populated with official recognised systems from the EPSG. EPSG:3857 -- WGS84 Web Mercator (Auxiliary Sphere): SR-ORG Projection -- Spatial Reference. Nuvens Resumo Obra De Arte Ao Ar Livre. Panoramas Aéreos | Aerorama

"Pseudo Mercator" { Internal 68 "Spheroid" <spheroid> "Longitude of central meridian" <4:angle ew:dd> "Latitude of true scale" <5:angle ns:dd> "False easting at central meridian" <6:distance ew:meters> "False northing at origin" <7:distance ns:meters> } EPSG now has a custom projection method, 1024, for google mercator (assuming major axis sphere I believe). Prodigy: “Do not try to think outside the box. That’s impossible. Simply try to realize the truth.” Neo: “Which is?” Prodigy: “There is no box.”To provide a practical demonstration of this problem, consider the following location, expressed in WGS84 (latitude, longitude) coordinates: Melita Kennedy at ESRI offered some comments in an email thread where sharing b/w ArcGIS and GDAL was hindered. For what it's worth, this was with respect to both GeoTIFFs and Shapefiles. wolf, I believe there's a typo. Isn't there a missing I in auxilIary (SRS_PT_MERCATOR_AUXILARY_SPHERE) ?

**The truth is that there is no sphere in Web Mercator**. Web Mercator is just a projection that maps from to ellipsoidal LL to XY and back to ellipsoidal LL. Yes, the Web Mercator uses spherical Mercator equations, but THERE IS NO SPHERE. You can still used NADCON to transform from NAD83 (or WGS84) ellipsoidal datum to NAD27 ellipsoidal datum and project on either end using Web Mercator. Web Mercator is just a non-conformal projection and there are many non-conformal projections. The sphere is an illusion. Get your head around that!double[] WGS84toGoogleBing(double lon, double lat) { double x = lon * 20037508.34 / 180; double y = Math.Log(Math.Tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180); y = y * 20037508.34 / 180; return new double[] {x, y}; } double[] GoogleBingtoWGS84Mercator (double x, double y) { double lon = (x / 20037508.34) * 180; double lat = (y / 20037508.34) * 180; lat = 180/Math.PI * (2 * Math.Atan(Math.Exp(lat * Math.PI / 180)) - Math.PI / 2); return new double[] {lon, lat}; } Share this:TwitterFacebookLike this:Like Loading... Related This entry was posted in Bing Maps and tagged Bing Maps, Google Maps, Mercator, Projection. Bookmark the permalink. ← Splitting Multi Geometries into single geometries Bing Maps UK Usergroup Meeting – January 19th 2011 → 62 Responses to The Google Maps / Bing Maps Spherical Mercator Projection Pingback: Tweets that mention The Google Maps / Bing Maps Spherical Mercator Projection | Alastair Aitchison -- Topsy.com

Update To do this purely in Leaflet, look at @ARsl's answer. Only reason I still accept this as my answer because, still feel uncomfortable doing the projection calculations like that (not that they are wrong), and just for that reason I don't accept this answer. Plus proj4js as added advantages of supporting many more datums.I own a mapping SIRGAS 2000 and would like to know what to do for my bing map background is in the same projection.*Great !*. But how to convert lat=-90 to mecartor. ProjNet throw AgumentException: “Transformation cannot be computed at the poles.” In WGS84toGoogleBing function if lat=-90 –> log(0) = NA ?

+proj=merc +a=6378137 +b=6356752.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs or using this WKT: WGS84坐标系： 国际标准，谷歌国外地图、osm地图等国外的地图一般都是这个. EPSG:3857 其实是EPSG协会（European Petroleum Survey Group）为 Web Wercator 最终设立的WKID，也就是现在我们常用的Web 地图的坐标系，并且给定官方命名 WGS 84.. This seems like it should be a relatively straightforward projection, and there are plenty of spatial libraries out there that can perform transformation and projection between geographic and projected coordinate systems, so why does this particular conversion seem to present so many problems? Most used: EPSG:4326 (WGS84), EPSG:3857 (Web-Mercator, deprecated EPSG:900913, ESRI 102100), EPSG:21781 WGS84 (das geläufigste, umgangssprachlich GPS). EPSG:3857 - The spherical mercator projection, e.g. used by TileCache, Google Earth etc. (formerly called EPSG:3785)

- Hello, I am accessing the table sys.spatial_reference_systems, but there is not SRID 3857 … I use SQL Server 2008 Enterprise. Can you help me?
- You are commenting using your Twitter account. ( Log Out / Change )
- Hello, i am one of the so-called “casual spatial developers”. i am trying to get the most functionality without the pain of understanding the details. I understand the concepts of datum and projection, but the least i need to know, the more i can do on what interests me (canoe maps).
- Yeah – just to add even more confusion on the issue, ESRI appear to have created their own codes that mirror those of the EPSG. Comment on the issue from Melita Kennedy, Senior Product Engineer at ESRI:
- ogr2ogr -t_srs EPSG:3857 statesp010g_epsg3857.shp statesp010g.shp Open ArcMap?, set Data Frame projection to Web Mercator Add the original (EPSG:4269) statesp010g.shp to map - it should align correctly using on-the-fly reprojection Add statesp010g_epsg3857.shp to map - note the incorrect vertical alignment offset Example of misalignment viewed over ESRI Web Mercator Topographic Basemap:
- The new projection, SRS_PT_MERCATOR_AUXSPHERE, has been integrated with the Proj4 converter and the OGR SRS validation mechanisms. Accordingly, I've removed the PROJ4 Extension 'override hack for google mercator.'

It is far away up in WGS 84 data frame (but will be ok if I switch the data frame to Web Mercator). With EPSG(900913) the output is georeferenced, but shifted about 3 raster cells to When I reproject the raster using ArcGIS (export in WGS_1984_Web_Mercator_Auxiliary_Sphere) the result is nearly fin Thanks for the comment, Morten – so much for me clearing the confusion, eh? 🙂 The point I’m trying to make with the “dual-ellipsoid” comment is that the Bing Maps tiles are projected based on a different ellipsoid from that in which the coordinates are supplied (specifically, the “output” ellipsoid is a perfect sphere) – perhaps your phrasing is better than mine. However, I disagree with your comment about EPSG:3857 – the “input” geographic spatial reference system used by Bing / Google *is* WGS84, and therefore needs to be stated with the appropriate inverse-flattening ratio (as it is in the latest EPSG database). However, as the comment in the EPSG database states, EPSG:3857 uses “spherical development of ellipsoidal coordinates.” – in other words whilst the “input” is based on the WGS84 ellipsoid, the “output” spatial reference system is based on the sphere.I don’t see any issue here… you’ve started with a set of coordinates from the OSGB National Grid system, which is EPSG:27700. You’ve then converted it into WGS84 geographic coordinates (EPSG:4326) in your first example, and Spherical Mercator projection in your second (EPSG:3857). (518032, 169094) (EPSG:27700) = (-0.304339270784791, 51.4085960537841) (EPSG:4326) = (-33878.8926521592, 6693890.38230938) (EPSG:3857)PROJCS[“TM65 / Irish Grid”, GEOGCS[“TM65”, DATUM[“TM65”, SPHEROID[“Airy Modified 1849”,6377340.189,299.3249646, AUTHORITY[“EPSG”,”7002″]], AUTHORITY[“EPSG”,”6299″]], PRIMEM[“Greenwich”,0, AUTHORITY[“EPSG”,”8901″]], UNIT[“degree”,0.01745329251994328, AUTHORITY[“EPSG”,”9122″]], AUTHORITY[“EPSG”,”4299″]], UNIT[“metre”,1, AUTHORITY[“EPSG”,”9001″]], PROJECTION[“Transverse_Mercator”], PARAMETER[“latitude_of_origin”,53.5], PARAMETER[“central_meridian”,-8], PARAMETER[“scale_factor”,1.000035], PARAMETER[“false_easting”,200000], PARAMETER[“false_northing”,250000], AUTHORITY[“EPSG”,”29902″], AXIS[“Easting”,EAST], AXIS[“Northing”,NORTH]]“We have reviewed the coordinate reference system used by Microsoft, Google, etc. and believe that it is technically flawed. We will not devalue the EPSG dataset by including such inappropriate geodesy and cartography.”

The irregularity of the geoid is small (+/- 100m) compared with the difference between the sphere and the ellipsoid (about 20km at the poles). I am thinking that we should move to treating the pseudo-mercator projection method better in WKT, and tying the various systems together properly. Either use a custom projection like ESRI ("Mercator_Auxiliary_Sphere") or introduce the "Auxilary_Sphere_Type" parameter to standard Mercator. Relative to WGS 84 / World Mercator (CRS code 3395) errors of 0.7 percent in scale and differences in northing of up to 43km in the map (equivalent to 21km on the ground) may arise. Certain Web mapping and visualisation applications. It is not a recognised geodetic system: for that see ellipsoidal Mercator.. Since projection libraries assume the ellipsoid used in the “input” spatial reference is the same as that in the “output” spatial reference, you need a hack to override this:- +nadgrids is one way to do this, semi_minor is another.PROJCS["Google Mercator", GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137, 298.257223563]], PRIMEM["Greenwich", 0], UNIT["degree", 0.017453292519943295]], PROJECTION["Mercator (1SP)"], PARAMETER["semi_major", 6378137], PARAMETER["semi_minor", 6378137], UNIT["m", 1]] (from http://www.geotoolkit.org/modules/referencing/faq.html#Google) and geotools uses:

- The formulas describing the Mercator projection are all taken from G. Evenden’s libproj manuals [Evenden2005].
- Auxiliary Sphere 就是在告知你，这个坐标在投影过程中，将椭球体近似为正球体做投影变换，虽然 EPSG:3857 EPSG为 Web Wercator 最终设立的WKID，也就是现在我们常用的Web 地图的坐标系，并且给定官方命名 WGS 84 / Pseudo-Mercator
- @wolf Yes in morphFromESRI(), if the projection method is Mercator_Auxilary_Sphere, resolving it by importFromEPSG(3857) is a reasonable approach (we want to make sure that there's a EXTENSION["PROJ4", "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"] node in the WKT, what importFromEPSG(3857) will do)
- The big deal was that the missmatching was driving me crazy because I was using the lat/lon coordinates from google maps in that area and they didn’t match my maps on the GIS software. Obviously I thought the problem was at my side, on a datum translation.
- As a result, during the first few years, developers needed some other way to refer to the set of projection parameters used on the Google Map, and the code 900913 (i.e. GOOGLE) came into common usage. It’s worth noting that this code was never developed, nor supported, by the EPSG (hence the quotation marks on the heading to this section).

- or",6378137], PARAMETER["False_Easting", 0], PARAMETER["False_Northing", 0], PARAMETER["Central_Meridian", 0], PARAMETER["Latitude_of_origin", 0], UNIT["metre", 1, AUTHORITY["EPSG", "9001"]], AXIS["East", EAST], AXIS["North", NORTH], AUTHORITY["EPSG","3785"]] The final option, of course, is to forego the general projection routines and write your own specific mathematical transformation designed to convert only between Bing / Google Maps and WGS84. Thankfully, the decision to operate on a perfect sphere makes these functions very easy to write, using only a bit of spherical trigonometry:
- or” parameter) was the only way I could get Proj.NET to correctly project from WGS84 to EPSG:3857. If you can show me another way of achieving the correct result whilst stating 0 flattening for the input datum, I’d be very happy to be proved wrong 🙂
- C:\>cs2cs +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +to +proj=longlat +datum=WGS84 7000000 7000000 62d52'55.452"E 53d5'30.548"N 0.000 C:\>cs2cs +proj=merc +a=6378137 +b=6356752.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +to +proj=longlat +datum=WGS84 7000000 7000000 62d52'55.452"E 53d16'34.723"N 0.000 comment:9 Changed 6 years ago by wolf Owner: changed from warmerdam to wolf I'm working on a fix for this. Maybe anterim solution to recognize the Mercator_Auxilary_Sphere as EPSG:3857
- The following two examples, using first the original EXTENSION and then greenlaw's, shows that the results are different:
- +proj=longlat +datum=WGS84 +no_defs. EPSG:3086 NAD83 / Florida GDL Albers. EPSG:3857 Spherical Mercator
- I have copied the following WKT from http://spatialreference.orgref/epsg/29902, but when I try to load it with Proj.net CreateFromWkt(…) I get an exception:

PROJCS["WGS_84_Pseudo_Mercator", GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT["Degree",0.017453292519943295]], PROJECTION["Mercator"], PARAMETER["central_meridian",0], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["Meter",1], PARAMETER["standard_parallel_1",0.0]] but should be WGS84 is not the single truth when it comes to geodesy (certainly not here in the UK, where the Ordnance Survey would refuse to let you taint their OSGB36 data by transforming it into “inferior” WGS84). This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub?. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there. Hi Claire! Since a “real” GIS professional hasn’t stepped in yet, I can offer a couple comments. First, the 3857 projection is native to Google Maps and not Google Earth (which presents as something closer to an orthographic). If you’re pulling your river .kml from Google Earth, you’re in WGS84 geographicals. But, have you set up your GIS projection as 3857? Second, the difference in Northing between Mercator and Web Mercator is way more than 270 meters north of Kanyakumari (that is, anywhere in India). You’d have to be a lot closer to the Equator for that “small” of a discrepancy. So, I think you need to look for a different solution to your problem. Enough to drive you batty, heh? Vanakkam.

18 metres is not a huge discrepancy in map imagery of the entire world 🙂 And neither Google nor Bing Maps are designed for precise positioning purposes. However, when such discrepancies occur, I often find it helpful to refer to a third source. In this case, Open Street Map shows that location to be more consistent with Bing Maps – http://www.openstreetmap.org/?mlat=40.232732&mlon=0.272176&zoom=17 – located in the middle of the roundabout. It doesn’t prove that Google is “wrong” and Bing Maps is “right”, but OSM and Bing appear to be more consistent at least.If you’re using geoserver, you need to edit the projection parameters for 3857, replacing the projection from “Mercator” to “Mercator_1SP_Google”. Selected input coordinate system: WGS 84 (EPSG:4326) Applied Proj.4 text Selected output coordinate system: Pseudo-Mercator (EPSG:3857) Applied Proj.4 text Coordinate reference system. Type name, EPSG code or location to filte Firstly, you should start by making sure that you’re supplying the correct EPSG code, 3857, and that it corresponds to the projection parameters listed above.

The figure of the earth is complex. Even the geoid is only an approximation (think local surface roughness, the cell size of computed geoids is very coarse, there are multiple geoids in use). If your mapping the whole world on a mercator projection, a sphere is just as useful as an ellipsoid. At that scale most untrained people using a digital map won’t even notice the difference. On the other hand, if you write +proj=merc in Proj.4 and use different semi-major axes specified by +a and +b, then Proj.4 will use ellipsoid formulas, which is not what you want in Web Mercator. So the EXTENSION suggested by greenlaw does not describe Web Mercator. # WGS 1984 Web Mercator (Auxiliary Sphere) EPSG:3857. import argparse. _rMajor = 6378137 # Equatorial Radius, WGS84. _shift = math.pi * _rMajor. def DecimalDegreesToWebMercator(lon, lat

I agree, Alastair, that, given a sphere, the Wolfram equations are valid, no question. But where is that sphere? It’s a fiction. If you are gathering real-world geographicals with GPS, they are referenced to an ellipsoid, not a sphere. In this case, using the Wolfram equations would induce error. Web Mercator projection of ellipsoidal geographicals is valid, but, unlike the spherical and ellipsoidal Mercators, it’s non-conformal. In that sense Web Mercator wouldn’t be used for surveying, geodetic or (I guess) scientific purposes.Once we’ve solved the mystery over which EPSG code is which, we then come on to the problem of understanding the discrepancies between the different results of projection which the various codes above represent.Taken from the ESRI support forums at http://forums.arcgis.com/threads/8762-WGS-1984-Web-Mercator-(Auxiliary-Sphere)-WKID-102100 Draft saved Draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Submit Post as a guest Name Email Required, but never shown

You are commenting using your Google account. ( Log Out / Change ) 3. The actual projection used by Microsoft / Google itself is (a bit of) a hack, which can lead to misalignment issues when your code actually does the projection the “correct” way. For example, it is common to find issues raised across a number of tools that conversion between WGS84 and Bing / Google Maps leads to Y values that are “out” by about 20km – see the Proj.NET issues here, here, here, here, and here, the ArcGIS API for Silverlight issue here, or the issue for the Proj.4 library reported here, for example.

- Systems that treat the supplied coordinates as measured on a sphere will be incorrect, but so will systems that project the WGS84 ellipsoid directly using Mercator projection. In fact, this second class of errors explains the apparent “20km out” in the y coordinate only experienced in many of the posts linked to earlier. Since the WGS84 ellipsoid is oblate (like a sphere that’s been sat on) and less high than the sphere, features on a Mercator map projected directly from the WGS84 ellipsoid will appear to be closer to the equator than those projected from a sphere (i.e. placed too far south in the Northern Hemisphere, or too far North in the Southern Hemisphere).
- （二）WGS84 Web墨卡托. Web墨卡托是2005年谷歌在谷歌地图中首次使用的，当时或更早的Web墨卡托使用者还是称其为世界墨卡托 World 至今，EPSG:3857（WGS 84 / Pseudo-Mercator） 代号是web墨卡托的正式代号
- PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere", GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563] ], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433] ], PROJECTION["Mercator_Auxiliary_Sphere"], PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",0.0], PARAMETER["latitude_of_origin",0.0], PARAMETER["Standard_Parallel_1",0.0], PARAMETER["Auxiliary_Sphere_Type",0.0], UNIT["Meter",1.0], EXTENSION["PROJ4", "+proj=merc +a=6378137 +b=6356752.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs" ], AUTHORITY["EPSG","3857"] ] comment:8 Changed 6 years ago by mikrit I think the previous comment is a misunderstanding.
- Sorry, but you have actually added to the confusion – presumably references in the article to EPSG:3587 are typo errors. It really doesn’t help when you’re explaining issues related to the similarity of 3785 and 3857!
- But *all* spatial data is only an approximation defined in reference to an ellipsoid model. The “real-world” information you’re gathering using a GPS is an approximation based on the WGS84 ellipsoid. Using a spherical model is a simpler approximation, certainly, but it’s just as valid (after all, a sphere is just a special case of an ellipsoid in which all three axes are equal). Neither one truly reflects the shape of the geoid. So the “fictional” sphere is just as real as any other ellipsoid.

- LeafLet crs class L.CRS.EPSG3857 has only project method which converts L.LatLng to L.Point in EPSG:3857 coordinates. https://github.com/Leaflet/Leaflet/blob/master/src/geo/crs/CRS.EPSG3857.js
- or", 6378137.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","900913"]] from http://docs.geotools.org/latest/userguide/library/referencing/crs.html#google-maps
- 10 Leaflet lets you use panTo method by unproject 3857 point. If you don't want to use proj4js library it also achieve in leaflet.
- Haha I’m studying bats so yep, been driven pretty batty! I found out that Google Earth is actually ‘out’ across all of South India by 100-300m so I just have to manually readjust, inelegant but effective. http://productforums.google.com/forum/#!msg/gec-data-discussions/z2rEahyQa3U/YYjnIDhA5ewJ Thanks for your reply.
- or axis of 6,378,137. (Note – you can also provide a semi-major parameter if required, but in this case we want a sphere based on the same semi-major axis as the WGS84, so it is not necessary). This will override the WGS84 semi-
- SPHEROID[“Popular Visualisation Sphere”, 6378137, 0, AUTHORITY[“EPSG”,”7059″]]

The EPSG:3857 projection, in contrast, suggests a Mercator projection of coordinates defined on the WGS84 ellipsoid, with an Systems that treat the supplied coordinates as measured on a sphere will be incorrect, but so will systems that project the WGS84 ellipsoid directly using Mercator projection web-mercator. EPSG:3857. 地理坐标转换库，任意类型经纬度数据集(GeoJSON、数组、字符串)实现WGS84、GCJ02、BD09互转。 a utility library for helping convert coordinates from collection like GeoJSON or Array & ect.Use.. A GeoMedia coordinate system file defined using EPSG:3857, Spherical Mercator for Visualization can be used to represent data stored as Web Mercator Auxiliary Sphere Popular Visualization Spherical Mercator Google Maps Projection Pseudo Mercator OpenStreetMap projection Bing Maps..

Apparently Spatialite users are also affected: http://lists.osgeo.org/pipermail/gdal-dev/2012-December/034978.html *So, the following WKT works, for example in Proj*.NET, to specify the correct projection to Bing / Google Maps.

The EPSG Registry will show "Popular Visualisation Pseudo-Mercator" which will be parsed and identified as Web Mercator too ("[ESRI ignores] case, whitespace, and the characters “()/-_”." “The WKID was changed at version 10 to 3857. This is because this version of “web Mercator” closely aligns with the EPSG dataset’s entry (http://www.epsg.org). Doc’s out-of-date, I’ll ask that it be updated. The multiple codes are due to release timings: A. 102113 (because that was the only way we could emulate the web services’ definition) B. 102100 added next, using a differently built, but *completely* equivalent, definition C. EPSG then added 3857 (and deprecated their earlier 3785 entry which was closer to how 102113 was defined) D. We changed the ESRI 102100 code to EPSG 3857.”I tried using the suggested projection for proj.net above and it gave me results orders of magnitude out. However when I switched to this wkt:EPSG:3857 is a Spherical Mercator projection coordinate system popularized by web services such as Google and later OpenStreetMap.

Once you’ve done this projection onto a flat image, then you can get on with the business of chopping it up into smaller tiles as appropriate.# added by CH following https://alastaira.wordpress.com/2011/01/23/the-google-maps-bing-maps-spherical-mercator-projection/ class GoogleBing(Cylindrical): def __init__(self, lat0=0.0, lon0=0.0, flip=0): Cylindrical.__init__(self, lon0=lon0, flip=flip) self.minLat = -85 self.maxLat = 85 def project(self, lon, lat): lon, lat = self.ll(lon, lat) x = lon * 20037508.34 / 180 y = math.log(math.tan((90 + lat) * math.pi / 360)) / (math.pi / 180) y = y * 20037508.34 / 180 y = y * -1 # added because appeared upside down return (x, y)

In the PROJ.4 library, you can specify a null gridshift using the +nadgrids=@null parameter as explained here. In fact, the reason why, earlier this post, I specified that you need to use the latest version of CS2CS is that there was a change made in version 4.7.0 of the PROJ.4 library. This change means that that the +nadgrids=@null parameter is automatically added to the internal definition of the 3857 projection, which means that you no longer need to manually include it every time -you’ll get the correct result using the EPSG 3857 projection as-is. I think the name of the projection method we want is "Popular Visualisation Pseudo Mercator" (no hyphen) ... that is what the EPSG Registry for 3857 http://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::3857&reportDetail=short&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=epsg%203857 says. map.panTo(L.CRS.EPSG3857.unproject([1372720.6476878107, 5690559.995203462])); share | | follow | | | | answered Oct 20 '13 at 13:21 viktorija.solovjovaviktorija.solovjova 2111 bronze badge add a comment | Your Answer Thanks for contributing an answer to Stack Overflow!All parameters for the projection are optional, except the ellipsoid definition, which is WGS84 for the typical use case of EPSG:3857. In which case, the other parameters are set to their default 0 value.

PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere", GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984",6378137.0,298.257223563]], PRIMEM["Greenwich",0.0], UNIT["Degree",0.0174532925199433]], PROJECTION["Mercator_Auxiliary_Sphere"], PARAMETER["False_Easting",0.0], PARAMETER["False_Northing",0.0], PARAMETER["Central_Meridian",0.0], PARAMETER["Standard_Parallel_1",0.0], PARAMETER["Auxiliary_Sphere_Type",0.0], UNIT["Meter",1.0], AUTHORITY["ESRI","102100"]] NOTE: The Auxiliary Sphere Type parameter accepts 0 (use semimajor axis or radius of the geographic coordinate system), 1 (use semiminor axis or radius), 2 (calculate and use authalic radius), or 3 (use authalic radius and convert geodetic latitudes to authalic latitudes). "GDAL is using the EPSG name, “WGS 84 / Pseudo-Mercator”, but not the operation name of “Popular Visualisation Pseudo Mercator”, which is what we would key on. In fact, at ArcGIS 10.2.1, we will match up “Popular Visualisation Pseudo Mercator” as being the same as our “Mercator Auxiliary Sphere” implementation.

However, if you transform this point using, say the latest version (that’s important) of the CS2CS tool, as follows: SR-ORG Projection 7483 - **EPSG:3857** -- **WGS84** **Web** **Mercator** (**Auxiliary** **Sphere**). Projection used in many popular **web** mapping applications (Google/Bing/OpenStreetMap/etc). Sometimes known as EPSG:900913 Now, I could also implement the support for the Auxilary_Sphere_Type, and then would need to export a proper EPSG:3857 .prj file when producing that.

EPSG took some time to warm to the system used by Microsoft and Google, but eventually, in mid-2008 they decided to add the system to their code registry, assigning it the code EPSG: 3785. There was a small fanfare among the spatial community, and people started recoding the old 900913-hack code to use the new “official” code instead.I concede that all real-world measurements have error and, therefore, “*all* spatial data is only an approximation”. Surveyors recognize 3 kinds of error: (1) unavoidable random error that can be minimized as technology improves but which cannot be eliminated, (1) blunders (like a numerical transposition or multipath) that can be eliminated (in theory) with good technique, and (3) bias or systematic error due to an un-calibrated instrument (always reading long, for example) or an incorrect mathematical model (using a sphere instead of an ellipsoid, for example). We get rid of the errors we can (blunders and bias) and use statistics to evaluate the errors we can’t (random). You are confusing random error with mathematical bias, Alastair. The geocenter is 20km closer to the pole than the equator in the WGS84 ellipsoid. That’s a lot of mathematical bias to accept just because “a sphere is just a special case of an ellipsoid” or because your GPS receiver has a few decimeters of random error. BTW, the only reason OSGB36 may fit the geoid better in the UK than WGS84 is that it was locally adjusted (rather than worldwide). The switched-on Brits I know have moved to ETRF89. Time to put your parochialisms aside. BTW … great blog. Thanks. EPSG:3857 is a Spherical Mercator projection coordinate system popularized by web services such as Google and later OpenStreetMap. OSGEO:41001 - OSGeo created this code while developing the Tile Map Service (TMS) specification. It was superseded by 900913. (equivalent, deprecated)

Notice that, whilst the X coordinate remains the same, the Y coordinate differs by something like 35km between the two conversions. Projecting a simplified polygon of the United Kingdom using the same projection parameters in these two tools results in differences as shown in the following images:This point, incidentally, is the WGS84 coordinate of the point that lies at the bottom left hand corner of Bing Maps’ quadkey 031311. If you project this location into the “official” Google /Bing Maps projection (EPSG:3857) using the Proj.NET reprojection library, you’ll get the following result:

@wolf It would be great if exporting to ESRI-compatible EPSG:3857 format was supported in addition to import support. Has a separate ticket been opened for that? All my inherited raster and vector files for the area should be in GCS_WGS_1984 as they were either in this format or I’ve converted them. I’ve also added XY data I took using a GPS and converted from DD.MM.MMMM to DD.DDDD which is all correctly aligned with the raster and vector files I inherited. The .kml file I converted to a layer file says it has the same coordinate system and datum (D_WGS_1984). I’m banging my head against a brick wall trying to see where the problem is! I’ve tried using bing maps as a base layer but the resolution for my area of rural India isn’t high enough, and I tried putting jpg files from google earth in but to get enough detail I’ll have to input millions of tiny files.

2. The EPSG code assigned to the projection has changed several times and much of the information displayed on the internet, as well as used in spatial applications themselves, is out-of-date. You’ll see references to EPSG 900913, 3857, 3785, 3587, and various different definitions of each of those systems. EPSG:3857 -- WGS84 Web Mercator (Auxiliary Sphere): SR-ORG Projection -- Spatial Reference. I tried this and it does NOT work: var bingMapProjection = new GM_Projection_t { Can anyone show me the correct version of the WKT or point me to a good source? I would have thought the site would be correct, or is it Proj.net at fault? How will I use above panTo method if my coordinates are in EPSG:3857 for example (3679364.68,-9096106.74) ? This is quite simple to to in Openlayers as once you define a map projection everything works in that projection. But Leaflet always works on latlng on the outside

Data provided by websites.milonic.com. See full profile of this website GEOGCS[“WGS 84”, DATUM[“WGS_1984”, SPHEROID[“WGS 84”, 6378137, 298.257223563, AUTHORITY[“EPSG”, “7030”]], AUTHORITY[“EPSG”, “6326”]], PRIMEM[“Greenwich”, 0, AUTHORITY[“EPSG”, “8901”]], UNIT[“degree”, 0.0174532925199433, AUTHORITY[“EPSG”, “9122”]], AUTHORITY[“EPSG”, “4326”]]

If you’re using any other system, you need to add an additional “semi_minor” parameter to the projection parameters in the WKT. This parameter allows you to manually specify the semi-minor axis of the ellipsoid used for the projection, which by default is otherwise assumed to be the same ellipsoid specified in the GEOGCS.The EPSG:3857 projection, in contrast, suggests a Mercator projection of coordinates defined on the WGS84 ellipsoid, with an inverse-flattening ratio of 298.257223563:I did (what I thought was) a simple port of your code to python to use it within kartograph.py, but I found that using it to create a new GoogleBing projection within the kartograph proj module, cloning the Mercator projection at… https://github.com/kartograph/kartograph.py/blob/master/kartograph/proj/cylindrical.py …but the resulting coordinates created an upside-down projection.

Loading… Log in Sign up current community Stack Overflow help chat Meta Stack Overflow your communities Sign up or log in to customize your list. more stack exchange communities company blog By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. No part of this article is related to UTM projection – it’s about converting from WGS84 geographic coordinates to Web Mercator projected coordinates. If you want to convert to one of the UTM zones I recommend you use GDAL. The problem is with the export part. I only fixed the importing of shapefiles with Mercator_Auxilary_Sphere to be recognized as Spherical mercator. Now the output of your sample command produces something that is WGS_84_Pseudo_Mercator with projection Mercator, which AFAIK ArcGIS doesn't recognize as spherical mercator. I am using WKT from : http://spatialreference.org/ref/epsg/32750/prettywkt/ (for UTM Zone 50S) http://spatialreference.org/ref/sr-org/7483/prettywkt/ (for EPSG 3857 / OpenStreetMap)Web Mercator is completely reversible between LL and xy, but that’s just the reprojection part of the transformation. Datum shifts are separate, and happen only in geographic coordinates. There is no systematic way to transform data cast on a sphere to WGS84 – no equivalent of the nadcon software for this transformation. But ESRI will allow you to specify this transformation anyway; their Project module will reassign input data from sphere to WGS84 and complete the reprojection. This works just fine as long as the data were originally in WGS84 or another datum – which was the case for a number of datasets I had to transform from sphere to NAD83. I “Asked a Cartographer” at ESRI about this last December: http://mappingcenter.esri.com/index.cfm?fa=ask.answers&q=2233. Still getting my head around Web Mercator, thanks for the comment.

There is no possible “decision to operate on a perfect sphere”. Real-world coordinates are ellipsoidal. Spherical computations are a fiction. This is the heart of the difference between EPSG 3785 and 3857, viz. the recognition that the input geographicals are ellipsoidal and that the Web Mercator, though it uses spherical Mercator equations, is a different projection when applied to ellipsoidal geographicals, a non-conformal projection that (IMO) should not be called “Mercator”. -NoelNote that I’m not describing the process of cutting up tiles or anything to do with quadkey numbering systems – these topics are already described well in this MSDN article. Instead, I’m just talking about how you project geographic coordinate data defined on a 3d model of the world, such as this:I imagine that it’s simply due to a difference in the logic of SVG x/y coordinates compared to .Net. Multiplying the y coordinate by -1 superficially solves the problem. GDAL currently translates EPSG:3857 as: PROJCS[WGS 84 / Pseudo-Mercator, GEOGCS[WGS 84 The EXTENSION element with a special proj.4 string that forces use of the semi-major sphere for projection calculations, but treated as WGS84 You’re right – there’s was a typo near the top of the article – I’ve corrected now. I did say that the similarity of codes was confusing, and I’m not the only one to make this mistake – see the post from ESRI Senior Product Engineer Melita Kennedy at http://forums.arcgis.com/threads/8762-WGS-1984-Web-Mercator-(Auxiliary-Sphere)-WKID-102100 that refers to “deprecating their earlier 3587 entry”…

PROJCS["WGS 84 / Pseudo-Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], UNIT["metre",1, AUTHORITY["EPSG","9001"]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"], AUTHORITY["EPSG","3857"], AXIS["X",EAST], AXIS["Y",NORTH]] The EXTENSION element with a special proj.4 string that forces use of the semi-major sphere for projection calculations, but treated as WGS84. I am attaching a patch which adds the custom projection, Mercator_Auxiliary_Sphere as suggested above. The overall affect is to change that way that GDAL exposes the Web Mercator SRS. The old conversion is shown above. The patched conversion is quite similar to the ESRI definition (also above) and looks like this:

PROJCS["WGS 84 / Pseudo-Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84", 6378137, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.01745329251994328, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre", 1, AUTHORITY["EPSG","9001"]], AXIS["X",EAST], AXIS["Y",NORTH], AUTHORITY["EPSG","3857"]] It’s not unusual for EPSG codes in the registry to be updated every now and again, but this change was particularly odd – firstly because it happened so soon after the original code had been introduced, and secondly because the “replacement” code 3857 was such a close permutation of the previous code 3785 (coincidence?).Would love to know what the issue is, but failing that this info may help someone else trying to convert from the uk codepoint postcode database to google maps. I have not attempted to update any format drivers to include support here. In particular, since it's unclear to me that there is any proper way to expose web mercator as a collection of geotiff tags, the GeoTiff? conversion here is unchanged. However, less than a year after the official EPSG: 3785 code was finally introduced, EPSG issued a change request (EPSG::2008.114, issued in Dec 2008), deprecating the 3785 code and introducing a new code, 3857, with corresponding parameters as follows: else if( EQUAL(osProj, SRS_PT_MERCATOR_AUXILARY_SPHERE) ) { // This is EPSG:3875 Pseudo Mercator. We might as well import it from // the EPSG spec. CPLString osAuxilarySphereType; importFromEPSG(3857); comment:17 Changed 5 years ago by wolf Typo fixed in r28374

Pingback: Conversion of British National Grid (WKID:27700) to WGS84(WKID:4326) and then to WebMercator (WKID:102100)- Draft « osedokThis surprises me. Web Mercator is completely reversible LLXY. The whole point of using Web Mercator with WGS84 rather than the ellipsoidal version of Mercator is that the reverse is closed (not iterative) and, thus, faster, though non-conformalities are introduced.I’ve not used TerrainComposer at all, but so long as you can export data with a similar flat projection it should be quite straightforward. Email (required) (Address never made public) Name (required) Website You are commenting using your WordPress.com account. ( Log Out / Change ) Noel – I’m not quite sure I agree with the statement that “spherical computations are a fiction“. And I don’t think the folks at MathWorld would agree either! http://mathworld.wolfram.com/SphericalCoordinates.html

“The problem is that there is no standardised way to represent this “dual”-ellipsoid system” Ths makes no sense to me. You don’t have a dual ellipsoid. What you have is an input and an output spatial reference. Each SR has each their ellipsoid. In the above case you have WGS84 (epsg:4326) and you have the Mercator projection with a spherical ellipsoid (epsg:3857). You use one for input, and another for output. You will end up with two points (input and output), each representing the same point in the world, but in different “units”. PROJCS["WGS 84 / Pseudo-Mercator", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4326"]], PROJECTION["Mercator_1SP"], PARAMETER["central_meridian",0], PARAMETER["scale_factor",1], PARAMETER["false_easting",0], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["X",EAST], AXIS["Y",NORTH], EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"], AUTHORITY["EPSG","3857"]] comment:19 Changed 5 years ago by Even Rouault Similar discussion dedicated to EPSG:3857 encoded in GeoTIFF in #5924 Developers started projecting their own spatial data to overlay on Google and Bing Maps ever since their APIs allowed you to do so, which was back in about 2005. Unfortunately, however, EPSG were rather dismissive of the system used by Microsoft and Google (more details in a bit) and refused to assign it an official EPSG code. An EPSG statement (as reported by Morten Nielsen ) read:

For EPSG:3857 (Web Mercator) with world boundaries, zoom level 0 corresponds to a scale of approximately 559,082,000, again with each subsequent zoom level having half the scale value. WGS84, WebMercator, or a name of a predefined gridset in GeoServer Pingback: SQL Server : Type geographique - [Partie 2] Introduction précise du type géographique , Blog technique de Nicolas Boonaert Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. map.panTo(new L.LatLng(40.17, -98.12)); How will I use above panTo method if my coordinates are in EPSG:3857 for example (3679364.68,-9096106.74) ?