transparent_color and transparent_color_tolerance do not work on sources other than wms
Context
for tile sources other than wms mapproxy does not handle selective image transparency. ie.
you cannot combine multiple tile sources that overlap without them being inherently transparent.
I reviewed the code and only the wms.py has the code to handle the transparent_color and transparent_color_tolerance flags.
Expected Behavior
specifying
image:
transparent_color: #ffffff
transparent_color_tolerance: 15
on a tile source is treated the same as on a wms source
Actual Behavior
the mapproxy-util throws an error:
mapproxy.config - WARNING - unknown 'transparent_color' in sources.[source].image
mapproxy.config - WARNING - unknown 'transparent_color_tolerance' in sources.[source].image
Possible Fix
copy the code from the wms.py to the other sources or abstract it to a reusable code block
Steps to Reproduce
- create a mapproxy.yaml file with 2 sources, 1 wms, 1 tile
- in both include a config block with
image:
transparent_color: [some color]
transparent_color_tolerance: [some value]
3. save the file and start mapproxy-util serve-develop mapproxy.yaml [optional flags]
4. observe error for the tile source config
Context
in order to combine tile sources, I have to create wms server wrappers and route the tile caches through them locally instead of being able to merge them in a cache. this is much less performant than directly referencing the internal caches for the tile sources.
Your Environment
- Version used: 1.13.0
- Environment name and version (e.g. Python 2.7.5 with mod_wsgi 4.5.9): python 3.5.3
- Server type and version:
- Operating System and version: Proxmox 6.x host w/ lxc container running debian 9.13
I just ran into the same issue. I wonder if this is an option that would be easy to basically copy and paste to the other source types or if it is dependent (or surrounded by) some more complex handling?