[MapProxy] transparent layers get an opaque background after merging

Travis Kirstine traviskirstine at gmail.com
Tue Oct 13 11:38:21 PDT 2020


You may need to define a request_format: image/png to the cache to ensure
that the source images are transparent.
https://mapproxy.org/docs/latest/configuration.html?highlight=request_format#request-format


On Tue, 13 Oct 2020 at 14:08, Tobias Wendorff <
tobias.wendorff at tu-dortmund.de> wrote:

> Hi there!
>
> I have a problem concerning the merging of two transparent layers: After
> merging, the displayed layer gets an opaque white background. The
> non-merged layers are displayed transparently - so these should be fine.
>
> The layers are based on MBTiles coming straight out of QGIS. I can't
> tell if the PNGs have an alpha channel or "palette transparency".
>
> Enabling a storage for "cache_polygons_patterns_mixed" didn't change the
> background.
>
> My Pillow is at version 6.2.2 (last version for Python2). MapProxy and
> all its dependencies and system libraries are up to date.
>
> Before filing a bug in Github, am I doing anything wrong?
> This might be associated with
> https://github.com/mapproxy/mapproxy/issues/2
>
> Best regards,
> Tobias
>
> layers:
>   - name: polygons_solid
>     title: polygons_solid
>     sources: [cache_polygons]
>   - name: patterns
>     title: patterns
>     sources: [cache_patterns]
>   - name: polygons_patterns_mixed_layer
>     title: polygons_patterns_mixed_layer
>     sources: [cache_polygons, cache_patterns]
>   - name: polygons_patterns_mixed_cache
>     title: polygons_patterns_mixed_cache
>     tile_sources: [cache_polygons_patterns_mixed]
>
> caches:
>   cache_polygons_patterns_mixed:
>     sources: [cache_polygons, cache_patterns]
>     grids: [osm_grid]
>     disable_storage: true
>   cache_patterns:
>     sources: []
>     grids: [osm_grid]
>     cache:
>       type: mbtiles
>       filename: /srv/mapproxy/data/patterns.mbtiles
>   cache_polygons:
>     sources: []
>     grids: [osm_grid]
>     cache:
>       type: mbtiles
>       filename: /srv/mapproxy/data/polygons.mbtiles
>
> grids:
>   osm_grid:
>     base: GLOBAL_MERCATOR
>     srs: 'EPSG:3857'
>     origin: nw
>
> globals:
>   cache:
>     base_dir: '/srv/mapproxy/cache_data'
>     lock_dir: '/srv/mapproxy/cache_data/locks'
>     tile_lock_dir: '/srv/mapproxy/cache_data/tile_locks'
>     concurrent_tile_creators: 2
>     link_single_color_images: true
>   image:
>     paletted: true
>     formats:
>       custom_format:
>         format: image/png
>         mode: P
>         colors: 32
>         transparent: true
>         encoding_options:
>           quantizer: fastoctree
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapproxy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20201013/a007307e/attachment.html>


More information about the MapProxy mailing list