<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.Shkpostityyli18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">About the SLD, opacity appears in stroke, fill, graphic, and raster in SLD 1.0.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> MapServer-users <mapserver-users-bounces@lists.osgeo.org>
<b>Puolesta </b>Steve Lime<br>
<b>Lähetetty:</b> keskiviikko 22. helmikuuta 2023 17.47<br>
<b>Vastaanottaja:</b> Matthew Graber <grabermtw@gmail.com><br>
<b>Kopio:</b> mapserver-users@lists.osgeo.org<br>
<b>Aihe:</b> Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS request URL with MapServer 8<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></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? <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">--Steve<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Feb 21, 2023 at 10:52 AM Matthew Graber <<a href="mailto:grabermtw@gmail.com">grabermtw@gmail.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal">Hello all!<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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<o:p></o:p></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<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Is there a way to accomplish this in MapServer 8?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Matt<o:p></o:p></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><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>