3

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: Tile directly requested from QGIS server

And here the tile requested through MapProxy: 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
  • Png og jpeg tiles? – user30184 Apr 24 '18 at 10:20
  • I use png, but just test with jpeg and produces the same result. – geraldo Apr 24 '18 at 10:31
1

Finally solved the issue following the advice of a message on MapProxy mailing list. Seems to be a problem with with an old version of Pillow on Ubuntu 16.04.

Update to latest version (and than reboot!) did the trick:

pip install Pillow==5.1.0

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.