I use MapProxy for caching WMS/WMTS tiles and it works fine up to a certain zoom level. But for higher zoom levels MapProxy fills the empty parts of the layers in black. This happens for certain geometries, mostly polygons where I only showe their stroke but they have an empty fill.
Here a comparison of the tiles requested to QGIS server and through MapProxy. First the tile requested directly from QGIS server:
And here the tile requested through MapProxy:
It seems to be a problem with transparencies as the white parts also should be transparent. I define transparent true at the sources configuration in mapproxy.yaml:
sources:
test_wms:
type: wms
req:
url: http://qgis-server.com/service?
layers: Test WMS
transparent: true
I additionally tried (without success) to define a global format and use in in cache:
globals:
image:
formats:
imgformat:
format: image/png
mode: P
transparent: true
Another test was to add the image parameter to the layer source configuration:
image:
transparent_color: '#ffffff'
transparent_color_tolerance: 0