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:

enter image description here

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:

enter image description here

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:

enter image description here

Am I missing something fundamental here? Is this to be expected?


It appears that this was a bug in v1.3.0 of MapProxy, and has been fixed. From the changelog for the pre-release version v1.4.0rc1:

- EPSG:4326/900913/3857 are now always initialized with the +over proj4
  option to prevent distortions at the dateline
  see: http://fwarmerdam.blogspot.de/2010/02/world-mapping.html

I updated to the new version and the reprojected output looks good:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.