[MapProxy] Mapproxy sends wrong request parameters to WMS server

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Wed Aug 31 09:36:56 EDT 2011


You forget that MapProxy is really a proxy in between you and the real server. The configuration file sets the rules for discussion between MapProxy and the remote server. Read http://mapproxy.org/docs/1.1.1/configuration.html  I suppose that the 1184x1184 sized request comes from these two settings

    MapProxy does not make a single request for every tile but will request a large meta-tile that consist of multiple tiles. meta_size defines how large a meta-tile is. A meta_size of [4, 4] will request 16 tiles in one pass. With a tile size of 256x256 this will result in 1024x1024 requests to the source WMS.
    MapProxy will increase the size of each meta-tile request by this number of pixels in each direction. This can solve cases where labels are cut-off at the edge of tiles.

And the format/png comes from these two
  The internal image format for the cache. The default is image/png.
  MapProxy will try to use this format to request new tiles, if it is not set format is used. This option has no effect if the source does not support that format or the format of the source is set explicitly (see suported_format or format for sources).

If you send the failing request from your browser you will see the error message from the remote GeoWebCache service:
400: Requested horizontal resolution: 45250.720744687496 , best match: 39135.7584765625 exceeds 10% threshold. Perhaps the client is configured with an incorrect set of scales (resolutions), or the DPI setting is off compared to the one in GWC ?

Do and read
<Abstract>Note that not all GeoWebCache instances provide a full WMS service.</Abstract>

This is obviously true with this GWC service. Next do

and thereafter you should have some information to go forward. Alternatively do

-Jukka Rahkonen-

Perdomo Curbelo  wrote:
Hello, Im doing some basic tests on Mapproxy and I am having some issues with certain WMS servers. Right now my config file includes 3 layers attached to 3 different servers like this:

  - name: fronteras
    title: Omniscale OSM WMS - osm.omniscale.net<http://osm.omniscale.net>
    sources: [cache_fronteras]
  - name: topo
    title: Cubewerx
    sources: [cache_topo]
  - name: osm
    title: OSM
    sources: [cache_osm]

    grids: [GLOBAL_MERCATOR, global_geodetic_sqrt2]
    sources: [serv1]
    grids: [GLOBAL_MERCATOR, global_geodetic_sqrt2]
    sources: [serv2]
    sources: [serv3]

    type: wms
      url: http://osm.omniscale.net/proxy/service?
      layers: osm
    type: wms
      url: http://demo.cubewerx.com/demo/cubeserv/cubeserv.cgi?
      layers: Foundation.ETOPO2
    type: wms
      layers: osm_auto:all

Both layers "topo" and "fronteras" work fine. For example, if i write these requests in my browser:,19.1162109375,-2.2412109375,36.6943359375&WIDTH=600&HEIGHT=400,19.1162109375,-2.2412109375,36.6943359375&WIDTH=600&HEIGHT=400<,19.1162109375,-2.2412109375,36.6943359375&WIDTH=600&HEIGHT=400>

I get the propper image as expected. But when I query the third server:,19.1162109375,-2.2412109375,36.6943359375&WIDTH=600&HEIGHT=400<,19.1162109375,-2.2412109375,36.6943359375&WIDTH=600&HEIGHT=400>

I get a HTTP error. Looking inside mapproxy log file, it shows this warning and thea ctual request to the server:

2011-08-31 12:23:20,063 - WARNING - mapproxy.source.wms - could not retrieve WMS map: HTTP Error ",-782715.16964,782715.16964,10801469.341&service=WMS&format=image%2Fpng&styles=&srs=EPSG%3A900913&request=GetMap&height=1184": 400

Notice that the parameters are all messed up. Original width and height was 256x256 and it changes to 1184x1184. It also changes the image format from jpeg to png, and also the bounding box and EPSG values are completely different. I have never used these values before so its not likely to be a cached query or some old requests previously done.

I hope you can give me some clues about this error. Thanks in advance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapproxy/attachments/20110831/265ee703/attachment-0001.html

More information about the MapProxy mailing list