I have configured MapProxy to aggregate imagery from a number of Internet sources so that I can dynamically overlay them by adjusting the
layers=<x> query that I pass to MapProxy's WMS service. This all seems to be working properly.
Here's the problem: some of the sources are TMS servers, which use the spherical Mercator (EPSG:900913) projection. Some of the others are WMS servers that only serve data in the EPSG:4326 (WGS84) projection. MapProxy is nice enough to handle this for me, caching the images in their native projection and then reprojecting them to the target projection when I request them. However, there is a great deal of distortion in the resulting images near the -180/+180 degree longitude line. Here's an example:
The source image is from MapQuest's Open Aerial service, which is in global Mercator. The above is MapProxy's reprojection of the source to EPSG:4326. For most of the globe, it looks great, but the rightmost part of the image is obviously way off. If I request it in its native projection, then I get a nice image:
I see very similar results if I take an EPSG:4326 source (Landsat images from this WMS source) and request it from MapProxy using EPSG:900913:
Am I missing something fundamental here? Is this to be expected?