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
services: demo: tms: use_grid_names: true layers: - name: topo title: Topographic map from ArcGIS Online sources: [topo_cache] caches: topo_cache_source: grids: [GLOBAL_WEBMERCATOR] disable_storage: true sources: [topo_tiles] format: image/png topo_cache: grids: [GLOBAL_GEODETIC] sources: [topo_cache_source] format: image/jpeg sources: topo_tiles: type: tile url: http://services.arcgisonline.com/arcgis/rest/services/World_Topo_Map/MapServer/tile/%(z)s/%(y)s/%(x)s grid: GLOBAL_WEBMERCATOR
Around the equator it looks fine but it gets more and more distorted closer to the poles:
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.