[MapProxy] opacity not working?

DeDuikertjes DeDuikertjes at xs4all.nl
Sat Jan 7 07:34:23 EST 2012


Hi Michael, Oliver,

I've tried all options.
It didn't matter.
All results became opaque.

Then I added opacity: 0.4 to the definition of the CACHE.
Then the result is as expected. Nice and transparent.

Image mode can be RGBA or P, paletted true or false, transparent true or 
false. All doesn't matter. If opacity is set on the cache the results 
are OK, otherwise not.

Only when seeding mapproxy complains:

mapproxy.config - WARNING - unknown 'opacity' in caches._Bedrijventerrein.image

Also from doc's I understood that opacity should be set in source not cache.

Anyhow thank you all!

MArco


Op 6-1-2012 19:29, Michael Shishcu schreef:
> Hi Marco
>
> Can you try adding
>     image:
>       mode: RGBA
>       transparent: true
>       paletted: false
>
> to the cache (and source?) config. I can share my current yaml file 
> that is working a little bit later, if you want.
>
> regards, michael
>
> On Fri, Jan 6, 2012 at 7:38 PM, DeDuikertjes <DeDuikertjes at xs4all.nl 
> <mailto:DeDuikertjes at xs4all.nl>> wrote:
>
>     Oliver,
>
>     Thank you. I did as you suggested
>
>     I've added a layer to may config (see attached).
>     The result can be seen at:
>     http://178.63.74.185/hosting/demo/show_source.html?layernames=testlufo,Bedrijventerrein&test=true&opacity=1&url=http://test.tiles.md-kwadraat.nl/mp/service
>     <http://178.63.74.185/hosting/demo/show_source.html?layernames=testlufo,Bedrijventerrein&test=true&opacity=1&url=http://test.tiles.md-kwadraat.nl/mp/service>
>
>     Still the layer defined with transparency 0.4 is fully opaque. Am 
>     miss understanding something?
>
>     Marco
>
>     caches:
>       _Bedrijventerrein:
>         grids:
>         - applas_grid
>         link_single_color_images: true
>         sources:
>         - wms_Bedrijventerrein
>       _testlufo:
>         grids:
>         - applas_grid
>         link_single_color_images: true
>         sources:
>         - wms_testlufo
>     globals:
>       cache:
>         base_dir: /var/applas_user_data/test/cache/
>         lock_dir: /var/applas_user_data/test/cache/locks/
>         meta_buffer: 255
>         meta_size:
>         - 3
>         - 3
>         minimize_meta_requests: true
>     grids:
>       applas_grid:
>         bbox:
>         - -285401.920000
>         - 22598.080000
>         - 595401.920000
>         - 903401.920000
>         res:
>         - 3440.640000
>         - 1720.320000
>         - 860.160000
>         - 430.080000
>         - 215.040000
>         - 107.520000
>         - 53.760000
>         - 26.880000
>         - 13.440000
>         - 6.720000
>         - 3.360000
>         - 1.680000
>         - 0.840000
>         - 0.420000
>         - 0.210000
>         srs: EPSG:28992
>         tile_size:
>         - 256
>         - 256
>     layers:
>     - name: Bedrijventerrein
>       sources:
>       - _Bedrijventerrein
>       title: Bedrijventerrein
>     - name: testlufo
>       sources:
>       - _testlufo
>       title: testlufo
>     services:
>       tms: ~
>       wms:
>         image_formats:
>         - image/png
>         - png
>         md:
>           abstract: test for transparency.
>           access_constraints: none
>           contact:
>             address: none
>             city: none
>             country: The Netherlands
>             email: none
>             organization: none
>             person: none
>             phone: none
>             position: none
>             postcode: none
>           fees: None
>           online_resource: http://tiles.md-kwadraat.nl/
>           title: test for transparency.
>         srs:
>         - EPSG:28992
>     sources:
>       wms_Bedrijventerrein:
>         image:
>           opacity: 0.400000
>         req:
>           layers: Bedrijventerrein
>           transparent: true
>           url:
>     http://178.63.74.185/fcgi-bin/mapserv?map=/var/www/html/shared/services/wmsproxy/wmsproxy.map
>         supported_srs:
>         - EPSG:28992
>         type: wms
>       wms_testlufo:
>         concurrent_requests: 4
>         image:
>           opacity: 1.000000
>         req:
>           layers: Lufo
>           transparent: true
>           url:
>     http://178.63.74.185/fcgi-bin/mapserv?map=/var/www/html/shared/services/wmsproxy/wmsproxy.map
>         supported_srs:
>         - EPSG:28992
>         type: wms
>         wms_opts:
>           featureinfo: true
>
>
>
>
>
>     Op 6-1-2012 14:29, Oliver Tonnhofer schreef:
>>     Hi Marco,
>>
>>     On 06.01.2012, at 14:16, DeDuikertjes wrote:
>>>     Please help me with tracking down this problem.
>>>     Is there anything wrong with my config?
>>>     How can I track this problem. I really don't know where to start.
>>     it does only work when you overlay multiple layers. So you should try to add another layer below your layer.
>>
>>     Regards,
>>     Oliver
>>
>
>     _______________________________________________
>     MapProxy mailing list
>     MapProxy at lists.osgeo.org <mailto:MapProxy at lists.osgeo.org>
>     http://lists.osgeo.org/mailman/listinfo/mapproxy
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapproxy/attachments/20120107/1cb81d5b/attachment.html


More information about the MapProxy mailing list