<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 2014-05-05 14:46, Thorsten
Hildebrand wrote :<br>
</div>
<blockquote
cite="mid:trinity-5971b420-5230-4b55-9dbd-4019dd5d1aea-1399293996744@3capp-gmx-bs50"
type="cite">
<pre wrap="">Hi,
I have a problem with transparency in projected layers. Only a direct access (without cache/ without projection) keep the transparency. I use a WMS from Berlin "Karte von Berlin 1:5000 (K5)"</pre>
</blockquote>
If what you say is that Mapproxy receives transparent data from the
source and serves opaque data, that is indeed what I'm experimenting
and I'm surprised there is no follow-up to what is very akin to a
bug report.<br>
I captured the png images at various places and I ran pngcheck.<br>
<br>
site (4326) -> JOSM: transparent OK: 51.9 m_52.515_13.392.png
(500x500, 24-bit RGB, non-interlaced, 93.4%).<br>
site -> Mapproxy: transparent OK: (501x500, 24-bit RGB,
non-interlaced, 93.5%).<br>
site -> Mapproxy -> JOSM: opaque OK: /home/p/w/service.png
(500x500, 8-bit palette, non-interlaced, 57.2%)<br>
site -> Mapproxy cache: opaque: OK: (256x256, 8-bit palette,
non-interlaced, 63.8%).<br>
site -> Mapproxy cache -> JOSM: opaque OK: (500x500, 8-bit
palette+trns, non-interlaced, 54.5%).<br>
<br>
In short, both JOSM and Mapproxy receive 24-bit transparent images
and Mapproxy converts them to 8-bit opaque.<br>
<br>
I have tried to force the source to serve 8-bit but the
Mapproxy:source: documentation is less than clear about how to do
that and it seems that a Berlin's WMS version higher than 1.1.1 is
needed anyway.<br>
Conversely, I wanted to try to make the cache 24-bit, but I'll let
those who know what the doc should say do it.<br>
<br>
But be happy, I myself can't get JOSM to display transparently what
it's got transparent in its cache <strike>:-(</strike> :-)<br>
<br>
I'm sure that I have had Mapproxy serve and JOSM display transparent
images in the past, but I don't remember if they were cached and I
didn't have to go into details.<br>
<br>
All that for B/W ;-)<br>
<br>
Best regards,<br>
<br>
<table>
<tbody>
<tr>
<td>André.</td>
</tr>
</tbody>
</table>
<br>
<blockquote
cite="mid:trinity-5971b420-5230-4b55-9dbd-4019dd5d1aea-1399293996744@3capp-gmx-bs50"
type="cite">
<pre wrap="">My workaround is to set "transparent_color" and "transparent_color_tolerance" (see comments in config). I have tested with Mapproxy 1.6.0 on Linux and Windows. Can you give me a hint to fix my config so I can use the origin transparency, please?
Sample WMS-image from server with transparency: <a class="moz-txt-link-freetext" href="http://fbinter.stadt-berlin.de/fb/wms/senstadt/k5?styles=&format=image%2Fpng&height=512&bbox=15798.1766833,23489.0564695,15985.4492364,23675.8691852&transparent=True&layers=0&service=WMS&width=513&request=GetMap&srs=EPSG%3A3068&version=1.1.1">http://fbinter.stadt-berlin.de/fb/wms/senstadt/k5?styles=&format=image%2Fpng&height=512&bbox=15798.1766833,23489.0564695,15985.4492364,23675.8691852&transparent=True&layers=0&service=WMS&width=513&request=GetMap&srs=EPSG%3A3068&version=1.1.1</a>
Sample Mapproxy URL (cache, no transparency): <a class="moz-txt-link-freetext" href="http://localhost:8080/service?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=15741.14359397656880901,23447.16088805999970646,16150.58630272754999169,23623.10880490613999427&SRS=EPSG:3068&WIDTH=1238&HEIGHT=532&LAYERS=k5&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE">http://localhost:8080/service?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=15741.14359397656880901,23447.16088805999970646,16150.58630272754999169,23623.10880490613999427&SRS=EPSG:3068&WIDTH=1238&HEIGHT=532&LAYERS=k5&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE</a>
Sample Mapproxy URL (direct, transparency): <a class="moz-txt-link-freetext" href="http://localhost:8080/service?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=15741.14359397656880901,23447.16088805999970646,16150.58630272754999169,23623.10880490613999427&SRS=EPSG:3068&WIDTH=1238&HEIGHT=532&LAYERS=k5_direct&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE">http://localhost:8080/service?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=15741.14359397656880901,23447.16088805999970646,16150.58630272754999169,23623.10880490613999427&SRS=EPSG:3068&WIDTH=1238&HEIGHT=532&LAYERS=k5_direct&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE</a>
Thank you and greetings from Berlin,
Thorsten
small working mapproxy.yaml:
services:
demo:
wms:
srs: ['EPSG:3068', 'EPSG:4326', 'EPSG:3857']
image_formats: ['image/png', 'image/jpeg']
md:
title: MapProxy WMS Proxy
abstract: This is a minimal MapProxy example.
layers:
- name: k5
title: Berlin K5
sources: [berlin_k5_cache]
- name: k5_direct
title: Berlin K5 direct
sources: [berlin_k5_wms]
caches:
berlin_k5_cache:
grids: [webmercator]
sources: [berlin_k5_wms]
meta_size: [2, 2]
meta_buffer: 0
format: image/png
link_single_color_images: true
sources:
berlin_k5_wms:
type: wms
supported_srs: ['EPSG:3068']
coverage:
bbox: [13.079, 52.3284, 13.7701, 52.6877]
srs: EPSG:4326
req:
url: <a class="moz-txt-link-freetext" href="http://fbinter.stadt-berlin.de/fb/wms/senstadt/k5">http://fbinter.stadt-berlin.de/fb/wms/senstadt/k5</a>?
layers: '0'
transparent: true
format: image/png
image:
#transparent_color: '#ffffff'
#transparent_color_tolerance: 20
transparent: true
grids:
webmercator:
base: GLOBAL_WEBMERCATOR
_______________________________________________
MapProxy mailing list
<a class="moz-txt-link-abbreviated" href="mailto:MapProxy@lists.osgeo.org">MapProxy@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapproxy">http://lists.osgeo.org/mailman/listinfo/mapproxy</a>
</pre>
</blockquote>
<br>
</body>
</html>