I've come up against an issue which I believe involves misalignments between the spherical projection and the auxiliary sphere projection:

e.g. see https://alastaira.wordpress.com/2011/01/23/the-google-maps-bing-maps-spherical-mercator-projection/


Trying to convert coordinates from WGS84 Web Mercator Auxiliary Sphere to WGS84

I'm using GeoPandas to load a gdb file that was created in ArcGIS using what I believe is the WKID 3857 coordinate reference system. Because it was created in ArcGIS, the coordinates are meant to be interpreted in the context of the auxiliary sphere.

Without changing the data, I then create a geopackage file using geopandas:

data.to_file("file_name.gpkg", driver="GPKG")

but can't for the life of me figure out how to use set_crs to specify the auxiliary sphere version of EPSG 3857. Instead, it specifies it as the spherical version:

Here's how I set the CRS:

data = data.set_crs(epsg=3857, allow_override=True)

Then to see the crs:


<Derived Projected CRS: EPSG:3857>
Name: WGS 84 / Pseudo-Mercator
Axis Info [cartesian]:
- X[east]: Easting (metre)
- Y[north]: Northing (metre)
Area of Use:
- name: World between 85.06°S and 85.06°N.
- bounds: (-180.0, -85.06, 180.0, 85.06)
Coordinate Operation:
- name: Popular Visualisation Pseudo-Mercator
- method: Popular Visualisation Pseudo Mercator
Datum: World Geodetic System 1984 ensemble
- Ellipsoid: WGS 84
- Prime Meridian: Greenwich

Even if I don't explicitly set the CRS, reading out the CRS in GeoPandas right after loading the original gdb file, it shows it as the same pseudo Mercator version.

When this gpkg file is loaded by ArcGIS, it is interpreting the coordinates as if they were associated with the spherical projection, rather than the auxiliary sphere projection, and is causing a slight misalignment (on the order of a few km).

Using the Define Projection tool in ArcGIS to re-label the data as being associated with the auxiliary sphere projection does not work. It gives an Error (000146: Cannot alter the spatial reference of [filename].

Is there anything that can be done here? I know that it's possible to create a CRS file and then use the set_crs() function to take in a pyproj.CRS object, rather than specifying it as an EPSG number:


but I'm not fluent enough with these tools to figure out how to create a CRS object that has the auxiliary sphere projection version of 3857.

  • The auxiliary sphere version for 3857 uses the semimajor axis as the radius. I don't think you need to. By telling the software to use 3857, both definitions (ArcGIS version and GeoPandas version) should be equivalent. Perhaps check a coordinate in ArcGIS and then in geopandas? What are they?
    – mkennedy
    Oct 22, 2022 at 17:37
  • Thanks for the reply. I've checked coordinates and they do not line up (we used a single edge to test). I think there are 3 solutions: 1: Transform coordinates in python to be consistent with spherical projection (pseudo mercator). Then, when ArcGIS reads them, it will project more accurately. This may introduce small rounding errors though. 2: Set the CRS to auxiliary sphere version prior to sending to ArcGIS (which I can't figure out how to do) 3: Redefine the projection in ArcGIS so that ArcGIS understands that the coordinates are actually auxiliary (also can't figure out)
    – spacediver
    Oct 25, 2022 at 0:02


Your Answer

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