[MapProxy] MapProxy 1.8.1 error accessing WMTS with kvp

Oliver Tonnhofer olt at omniscale.de
Fri Oct 23 02:58:10 PDT 2015


thanks for the configuration. I had to change a few options to get it working and the URLs were not complete, so I’m not 100% sure that I tested exactly what you tested. A config that works with mapproxy-develop and URLs for this service are best to reproduce any issues.

> On 20.10.2015, at 16:15, dirk.thalheim at bkg.bund.de wrote:
> it seems in prior versions it didn't work neither. I just tested Version 1.8.0 and the same error appears. I attached the configuration.
> I might have a clue. I think it's connected to the formatting/parsing of the tilematrixset parameter. For WMTS both requests are working:
> .../wmts/tile/1.0.0/webatlasde/default/DE_EPSG_25832_ADV/0/0/0.png
> .../wmts/tile/1.0.0/webatlasde/default/DE_EPSG_25832_ADV/00/0/0.png
> For WMS (
> .../service?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&...&tilematrix=0&tilerow=0&tilecol=0 returns an TileOutOfRange-Exception 
> .../service?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&...&tilematrix=00&tilerow=0&tilecol=0 returns internal error

WMTS uses strings for TileMatrix and not integers (to allow 100k, 50k, etc. levels). 00 is the name of the first level in the WMTS Capabilities. However only the WMTS supports string-levels and it is not possible to configure a grid with string-levels. It looks like there is some inconsistency how the string-levels are handled in MapProxy. The KVP TileMatrix is not converted to an int-level and it tries to access the 00 cache. If you disable seed_only it will create 00.mbtiles and 0.mbtiles if you use both RESTful and KVP.

It is a bit related to: https://github.com/mapproxy/mapproxy/pull/190
The patch provided in this ticket is not backwards compatible, as it just converts all levels to strings.

I have no doubt that the right patch would be pretty simple, but it needs considerations about backwards compatibility and tests.
I suggest you to disable KVP requests in the meantime. 

> We're using MapProxy in offline mode and separately generating the SQLite cache with the mapproxy-seed tool. So I guess the logged error is due to insufficient write permissions for the server process. 

That’s likely. I couldn’t reproduce the internal error.


Oliver Tonnhofer  | Omniscale GmbH & Co KG  | http://omniscale.com
OpenStreetMap WMS and tile services         | http://maps.omniscale.com

More information about the MapProxy mailing list