<div dir="ltr">Hi all,<div><br></div><div>Thanks for your help! I was able to get the SLD_BODY WMS parameter to serve as a workaround for setting opacity. In case anyone else has this problem, the SLD I used in this case was:</div><div><br></div><div><StyledLayerDescriptor xmlns:sld="<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a>" version="1.0.0" xsi:schemaLocation="<a href="http://www.opengis.net/sld">http://www.opengis.net/sld</a> <a href="http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd</a>" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>" xmlns:ogc="<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>" xmlns:gml="<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>"></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><NamedLayer></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><Name>test_b</Name></div></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><UserStyle></div></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><FeatureTypeStyle></div></blockquote></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><Rule></div></blockquote></blockquote></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><Name>default</Name></div></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><RasterSymbolizer></div></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><Opacity>0.5</Opacity></div></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></RasterSymbolizer><br></blockquote></blockquote></blockquote></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></Rule><br></blockquote></blockquote></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></FeatureTypeStyle><br></blockquote></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></UserStyle><br></blockquote></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"></NamedLayer><br></blockquote></StyledLayerDescriptor><br><div><br></div><div>Appreciate everyone's help!</div><div>-Matt</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 22, 2023 at 11:51 AM Rahkonen Jukka <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg6410044307149341281">





<div lang="FI" style="overflow-wrap: break-word;">
<div class="m_-6888062684057259866WordSection1">
<p class="MsoNormal"><span>Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">About the SLD, opacity appears in stroke, fill, graphic, and raster in SLD 1.0.<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 style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> MapServer-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>>
<b>Puolesta </b>Steve Lime<br>
<b>Lähetetty:</b> keskiviikko 22. helmikuuta 2023 17.47<br>
<b>Vastaanottaja:</b> Matthew Graber <<a href="mailto:grabermtw@gmail.com" target="_blank">grabermtw@gmail.com</a>><br>
<b>Kopio:</b> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<b>Aihe:</b> Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS request URL with MapServer 8<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi Matthew: That functionality was indeed removed as part of 8.0. I kind of expect that we might build back something for more limited use cases if necessary, Does SLD support opacity/transparency? <u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">--Steve<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Tue, Feb 21, 2023 at 10:52 AM Matthew Graber <<a href="mailto:grabermtw@gmail.com" target="_blank">grabermtw@gmail.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">Hello all!<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">With MapServer 8, I'm wondering what the proper way to change the opacity of a single layer in a multilayer WMS request is.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">For example, the following URL excerpt shows the old way of accomplishing this that worked while using MapServer 7:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&LAYERS=test_a,test_b&map.layer[test_b]=OPACITY+50<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">My understanding is that this would have the same effect as adding "OPACITY 50" to the test_b layer in the mapfile. The mapfile containing test_a and test_b did not have OPACITY included when they were written. Obviously, this no longer
 works with MapServer 8, and now that request has the same results as omitting the "&map.layer[test_b]=OPACITY+50" portion entirely.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Based on <a href="https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmapserver.org%2Ffr%2FMIGRATION_GUIDE.html&data=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C751680624f65498df41008db14ec07c5%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C1%7C638126776216198394%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=CbH%2FfRUQdX9uq8H9QRy48X0BggqTStn4IDQR4jD%2B97Y%3D&reserved=0" target="_blank">https://mapserver.org/fr/MIGRATION_GUIDE.html</a>,
 I see that OPACITY now belongs inside a COMPOSITE object. I tried the following modifications to the request URL:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&LAYERS=test_a,test_b&map.layer[test_b].composite=OPACITY+50<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&LAYERS=test_a,test_b&map.layer[test_b].composite[0]=OPACITY+50<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I also tried this both with the mapfile left as-is, and with an empty COMPOSITE object being included in each layer object, and each time I got the same unsuccessful result as before.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Is there a way to accomplish this in MapServer 8?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Also, does this map.layer[layername]=... syntax still work in MapServer 8? The documentation at
<a href="https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmapserver.org%2Fcgi%2Fcontrols.html%23using-mapserver-version-8&data=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C751680624f65498df41008db14ec07c5%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C1%7C638126776216198394%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=nu1%2BBml9%2BZG%2BIvjJ8ZpRZ28kDVKzo960hSM%2F18s3Jng%3D&reserved=0" target="_blank">
https://mapserver.org/cgi/controls.html#using-mapserver-version-8</a> suggests it might no longer work for MapServer 8 (based on the heading "Using MapServer version < 8"), but the documentation at <a href="https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmapserver.org%2Fpdf%2FMapServer.pdf&data=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C751680624f65498df41008db14ec07c5%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C1%7C638126776216198394%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OGoZ%2FK4IwX1%2FVRmcWsewiygoys24Vg4eDlGYIhtdcUk%3D&reserved=0" target="_blank">https://mapserver.org/pdf/MapServer.pdf</a>
 shows the same examples with the heading "Using MapServer version <= 8" on page 1065 of the PDF, so I'm unsure if this is still intended to work in MapServer 8.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Matt<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
<a href="https://eur06.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fmapserver-users&data=05%7C01%7Cjukka.rahkonen%40maanmittauslaitos.fi%7C751680624f65498df41008db14ec07c5%7Cc4f8a63255804a1c92371d5a571b71fa%7C0%7C1%7C638126776216198394%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TonNCCvW%2FnZX%2FbNTKWsiKeXfFWrMMGXP3KnLTlUjDmA%3D&reserved=0" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><u></u><u></u></p>
</blockquote>
</div>
</div>
</div>

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