I want to transform tiles defined in Web Mercator (EPSG:3857) to WGS84 (EPSG:4326) using Mapproxy. Unfortunately the resulting WGS84 map gets more and more distorted to the poles. Here is my configuration

    use_grid_names: true

  - name: topo
    title: Topographic map from ArcGIS Online
    sources: [topo_cache]

    disable_storage: true
    sources: [topo_tiles]
    format: image/png
    grids: [GLOBAL_GEODETIC]
    sources: [topo_cache_source]
    format: image/jpeg

    type: tile
    url: http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/tile/%(z)s/%(y)s/%(x)s

Around the equator it looks fine but it gets more and more distorted closer to the poles:

With country borders

As I zoom in, the distortion gets smaller and smaller. In Leaflet zoom level 5 and up it is hardly noticeable. At max zoom it matches up perfectly.

Does anyone have an idea about what is going on? I'm not sure if I have done something wrong in the configuration or if there is a bug in Mapproxy. I have tried using Open Street Map as source and get exactly the same result. I have also tried defining a custom grid with specified bounding box but nothing I do gets rid of the distortion.

  • That's...weird. The north-south offset is classic for using an ellipsoidal Mercator versus the spherical Mercator that EPSG:3857 uses. Beyond that, no idea, I'm afraid. – mkennedy Dec 2 '16 at 18:24
  • If it makes any difference, I'm using this Docker image for Mapproxy. It uses the latest version (1.9.0) of Mapproxy. – user87400 Dec 5 '16 at 12:02
  • In your image you have two maps, which is 'distorted', what if both come from the same source – nmtoken Mar 13 at 15:20

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.