<div dir="ltr"><div>Hi: (Tom C and I are working together on the below). More info:<br></div><div><br></div><div>We have a given WMS layer which has, say, 6 styles and are finding that we have to setup</div><div>a distinct cache/source/layer definition for each layer/style combination. Users hitting</div><div>MapProxy would submit STYLES=, to which MapProxy would then issue STYLES=foo</div><div>(for example) to the upstream WMS given this is configured in MapProxy config.</div><div><br></div><div>When we configure a layer with NO styles defined in the MapProxy configuration, and issue</div><div>a STYLES=foo request, MapProxy throws an exception (the style exists in the upstream server).</div><div><br></div><div>Are we able to setup a single layer definition which allows for STYLES to be passed through? Or</div><div>do we have to setup a cache/source/layer definition for each layer/style combination? See [1]</div><div>for a sample configuration.<br></div><div><br></div><div>Thanks<br></div><div><br></div><div>..Tom</div><div><br></div><div>[1] <a href="https://gist.github.com/tomkralidis/ad89794f1fd0394842fc3cad9e5234f3" target="_blank">https://gist.github.com/tomkralidis/ad89794f1fd0394842fc3cad9e5234f3</a></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>On Mon, Mar 1, 2021 at 10:58 AM Rahkonen Jukka (MML) <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank">jukka.rahkonen@maanmittauslaitos.fi</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="white" lang="FI">
<div>
<p class="MsoNormal"><span lang="EN-US">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">The GetMap request looks correct to me. Does it give an error also if you send it with a browser? If it does, and if that style is really advertised for that layer in the GetCapabilities
then it feels like a server side issue.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> MapProxy <<a href="mailto:mapproxy-bounces@lists.osgeo.org" target="_blank">mapproxy-bounces@lists.osgeo.org</a>>
<b>Puolesta </b>Cooney, Tom (EC)<br>
<b>Lähetetty:</b> maanantai 1. maaliskuuta 2021 16.59<br>
<b>Vastaanottaja:</b> <a href="mailto:mapproxy@lists.osgeo.org" target="_blank">mapproxy@lists.osgeo.org</a><br>
<b>Aihe:</b> [MapProxy] Caching styles<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p><span style="font-size:12pt;color:black">Hi,<u></u><u></u></span></p>
<p><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
<p><span style="font-size:12pt;color:black">We are using MapProxy to cache our WMS server. Many of the layers are available in multiple styles and we wish to cache all available styles. For example the layer GDPS.ETA_TT is available in the following styles:<u></u><u></u></span></p>
<ul type="disc">
<li class="MsoNormal" style="color:black">
<span style="font-size:12pt">TEMPERATURE-LINEAR<u></u><u></u></span></li><li class="MsoNormal" style="color:black">
<span style="font-size:12pt">TEMPSUMMER<u></u><u></u></span></li><li class="MsoNormal" style="color:black">
<span style="font-size:12pt">TEMPSUMMER-LINEAR<u></u><u></u></span></li><li class="MsoNormal" style="color:black">
<span style="font-size:12pt">TEMPWINTER<u></u><u></u></span></li><li class="MsoNormal" style="color:black">
<span style="font-size:12pt">TEMPWINTER-LINEAR<u></u><u></u></span></li><li class="MsoNormal" style="color:black">
<span style="font-size:12pt">TEMPERATURE<u></u><u></u></span></li></ul>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black;background:white none repeat scroll 0% 0%">When I make a request with the styles parameter blank I receive the expected image. However, whenever I add a style to the request I receive an error saying </span><b><span style="font-size:12pt;font-family:"Calibri",sans-serif;color:black">StyleNotDefined">unsupported
styles: TEMPSUMMER. </span></b><span style="font-size:12pt;color:black"> A simplified version of the config I am using is below. A sample request with blank style parameter and a sample request with <b><span style="font-family:"Calibri",sans-serif">STYLE=TEMPSUMMER</span></b>
are also below.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black;background:white none repeat scroll 0% 0%">How do I setup these styles in the config?</span><span style="font-size:12pt;color:black"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">Thank you for your time,<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">Tom Cooney<u></u><u></u></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">caches:<br>
GDPS.ETA_TT_cache:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"> sources:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"> - GDPS.ETA_TT_source<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">layers:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"> name: GDPS.ETA_TT<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"> sources:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"> - GDPS.ETA_TT_cache<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">sources:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"> GDPS.ETA__TT_source:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"> req:<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"> layers: GDPS.ETA_TT<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"> url: https ....<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"> styles: TEMPSUMMER<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">Request with blank styles parameter (returns the image as expected)<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><a href="http://geomet-dev-03.cmc.ec.gc.ca:8000/service?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-90,-180,90,180&CRS=EPSG:4326&WIDTH=1351&HEIGHT=676&LAYERS=GDPS.ETA_TT&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE&TIME=2021-02-26T00:00:00Z" target="_blank">http://geomet-dev-03.cmc.ec.gc.ca:8000/service?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-90,-180,90,180&CRS=EPSG:4326&WIDTH=1351&HEIGHT=676&LAYERS=GDPS.ETA_TT&STYLES=&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=TRUE&TIME=2021-02-26T00:00:00Z</a><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black">Request with a style (returns <b><span style="font-family:"Calibri",sans-serif;background:white none repeat scroll 0% 0%">StyleNotDefined</span></b> error)<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><a href="http://geomet-dev-03.cmc.ec.gc.ca:8000/service?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-90,-180,90,180&CRS=EPSG:4326&WIDTH=1351&HEIGHT=676&LAYERS=GDPS.ETA_TT&STYLES=TEMPSUMMER&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=T" target="_blank">http://geomet-dev-03.cmc.ec.gc.ca:8000/service?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-90,-180,90,180&CRS=EPSG:4326&WIDTH=1351&HEIGHT=676&LAYERS=GDPS.ETA_TT&STYLES=TEMPSUMMER&FORMAT=image/png&DPI=96&MAP_RESOLUTION=96&FORMAT_OPTIONS=dpi:96&TRANSPARENT=T</a><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12pt;color:black"><u></u> <u></u></span></p>
</div>
</div>
</div>
_______________________________________________<br>
MapProxy mailing list<br>
<a href="mailto:MapProxy@lists.osgeo.org" target="_blank">MapProxy@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapproxy" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapproxy</a><br>
</blockquote></div></div>