<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Travis,<br>
      <br>
      Thanks for the pointer. Really usefull.<br>
      <br>
      It leads me to some very usefull insights, but I'm not sure that
      all behavior is as expected.<br>
      <br>
      Adding to the source:<br>
          image:<br>
            opacity: 1<br>
      AND setting the image format on the cache to image/png:<br>
           format: image/png<br>
      <br>
      does something very usefull: it merges all layers as wished as
      long as there is no fully opaque (as served from the source wms)
      layer in the mix. If so, the fully opaque layer will off course
      prevent all layers below to be shown. That I'd like to solve by
      giving some opacity to that layer. Preferably via a generic option
      on the cache like:<br>
      <br>
      Adding an opacity setting to the cache on top of the settings
      above like:<br>
          image: {opacity: 0.8}<br>
      <br>
      But ... this does something odd. The opacity setting is applied
      with each layer added, so the bottom most layer in the resulting
      image is barely visible. I think that is not as it should be.
      Opacity should only be applied to the layer added to the stack of
      layers, not the stack it self.<br>
       <br>
      If I use a setting on a fully opaque (as served from the source
      wms) layer source like:<br>
          image:<br>
            opacity: 0.8<br>
      The layers below this one are not visible at all. I do not think
      that is as it should be.<br>
      <br>
      Do I have found two issues or am I missing some advanced config
      trick again? Again any help appreciated.<br>
      <br>
      MArco<br>
      <br>
      On 21-03-17 22:14, Travis Kirstine wrote:<br>
    </div>
    <blockquote
cite="mid:CALtm4h0Cjs7MVSgJ_n_6DQ2Pen7dfFOmiUyw4pgW=_okRk-tMA@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        does this help:<br>
        <br>
        <br>
        <a moz-do-not-send="true"
href="https://github.com/mapproxy/mapproxy/blob/master/mapproxy/test/system/fixture/combined_sources.yaml">https://github.com/mapproxy/mapproxy/blob/master/mapproxy/test/system/fixture/combined_sources.yaml</a><br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On 21 March 2017 at 11:15, deduikertjes
          <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:deduikertjes@xs4all.nl" target="_blank">deduikertjes@xs4all.nl</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div class="m_2303906294296285933moz-cite-prefix">Travis,<br>
                <br>
                Thanks. I tried. Mapproxy reports: <br>
                <pre>mapproxy.config - WARNING - unknown 'opacity' in globals.image.formats.my_<wbr>format</pre>
      Seems logical as opacity is not mentioned in the docs as an option
      for an image format<div><div class="h5">

      On 21-03-17 14:50, Travis Kirstine wrote:

    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">I added a new global my_format with the opacity
        defined and used it for the caches - does that work?

        <div>
          <div class="gmail_extra">

            <div class="gmail_quote">On 21 March 2017 at 07:03,
              deduikertjes <span dir="ltr"><<a moz-do-not-send="true" href="mailto:deduikertjes@xs4all.nl" target="_blank">deduikertjes@xs4all.nl</a>></span>
              wrote:

              <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <div bgcolor="#FFFFFF"> <font face="Agrofont">Layer
                    merging problem

                    

                    Hi List,

                    

                    When (vertically) merging layers (mapproxy 1.9)
                    results are not as expected.

                    

                    Merging two layers which have fully transparent
                    areas show only the topmost layer. The bottom layer
                    is not shown as should (not at all).

                    If the top layer has no fully transparent areas but
                    is completely opaque and opacity is set to eg 0.8
                    the bottom layer is shown as should. 

                    

                    Did I make a config error or did I run into a bug?

                    

                    Any help greatly appreciated, MArco

                    

                    An excerpt from my config:

                    

                    services:

                      tms:

                        # needs no arguments

                      wms:

                        srs: ['EPSG:28992']

                        image_formats: ['image/png', 'png']

                    

                    globals:

                      cache:

                        minimize_meta_requests: true

                        meta_size: [1, 1]

                        meta_buffer: 0

                        

                      image:

                        paletted: false

                        formats:

                          image/png:

                            mode: RGBA

                            transparent: true

                  </font></div>
                <div bgcolor="#FFFFFF"><b><font face="Agrofont">    
                      my_format:     </font>

                  </b></div>
                <div bgcolor="#FFFFFF"><b><font face="Agrofont">       
                      format: image/png:

                              mode: RGBA

                              transparent: true</font></b></div>
              </blockquote>
              <div><b>          opacity: 0.8</b> 

              </div>
              <div>

                 </div>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <div bgcolor="#FFFFFF"><font face="Agrofont"> sources:

                      wms_source1:

                        type: wms

                        wms_opts: 

                          featureinfo: true

                          legendgraphic: true

                        supported_srs: ['EPSG:28992']

                        req:

                          url: '<a moz-do-not-send="true" class="m_2303906294296285933gmail-m_8234804354909700662moz-txt-link-freetext" href="http://myservice.nl/geoserver/gwc/service/wms" target="_blank">http://myservice.nl/geoserver<wbr>/gwc/service/wms</a>?'

                          layers: 'layer1'

                          transparent: true

                    

                      wms_source2:

                        type: wms

                        wms_opts: 

                          featureinfo: true

                          legendgraphic: true

                        supported_srs: ['EPSG:28992']

                        req:

                          url: '<a moz-do-not-send="true" class="m_2303906294296285933gmail-m_8234804354909700662moz-txt-link-freetext" href="http://myservice.nl/geoserver/gwc/service/wms" target="_blank">http://myservice.nl/geoserver<wbr>/gwc/service/wms</a>?'

                          layers: 'layer2'

                          transparent: true

                    

                    caches:

                      _source1:

                         sources: [wms_source1]

                         link_single_color_images: true

                         disable_storage: true

                  </font></div>
                <div bgcolor="#FFFFFF"><font face="Agrofont"> <b>    
                      format: my_format</b>

                  </font></div>
                <div bgcolor="#FFFFFF"><font face="Agrofont"> 

                      _source2:

                         sources: [wms_source2]

                         link_single_color_images: true

                         disable_storage: true

                  </font></div>
                <div bgcolor="#FFFFFF"><font face="Agrofont"> <b>    
                      format: my_format</b>

                  </font></div>
                <div bgcolor="#FFFFFF"><font face="Agrofont"> 

                    layers:

                    

                      - name: 'layer1'

                        sources: [_source1]

                        title: 'layer 1'

                    

                    

                      - name: 'layer2'

                        sources: [_source2]

                        title: 'Layer 2'

                  </font> </div>
                

                ______________________________<wbr>_________________

                MapProxy mailing list

                <a moz-do-not-send="true" href="mailto:MapProxy@lists.osgeo.org" target="_blank">MapProxy@lists.osgeo.org</a>

                <a moz-do-not-send="true" href="https://lists.osgeo.org/mailman/listinfo/mapproxy" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailma<wbr>n/listinfo/mapproxy</a>

              </blockquote>
            </div>
            

          </div>
        </div>
      </div>
    </blockquote>
    <p>

    </p>
  </div></div></div>

</blockquote></div>
</div>



</blockquote><p>
</p></body></html>