Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS request URL with MapServer 8

2023-02-22 Thread Matthew Graber
Glad I could help, Jeff! MapServer.pdf is a great resource!

-Matt

On Tue, Feb 21, 2023 at 1:02 PM Jeff McKenna 
wrote:

> Wonderful to hear that you are using the MapServer.pdf!  (I actually put
> much effort into maintaining that PDF output, that but I never hear
> feedback...until someone reports a problem, like you did now, ha).
> Sometimes my updates differ from website rebuilds, will be sure to
> update the PDF for the upcoming 8.0.1 release.
>
> Again, thanks for this report!
>
> (also, don't be afraid to report doc issues like this at
> https://github.com/MapServer/MapServer-documentation/issues )
>
> thanks again for the report!
>
> -jeff
>
>
>
>
> --
> Jeff McKenna
> GatewayGeo: Developers of MS4W, MapServer Consulting and Training
> co-founder of FOSS4G
> http://gatewaygeo.com/
>
>
>
> On 2023-02-21 12:52 p.m., Matthew Graber wrote:
> > Hello all!
> >
> > With MapServer 8, I'm wondering what the proper way to change the
> > opacity of a single layer in a multilayer WMS request is.
> >
> > For example, the following URL excerpt shows the old way of
> > accomplishing this that worked while using MapServer 7:
> >
> >
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b]=OPACITY+50
> >
> > 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 "[test_b]=OPACITY+50"
> > portion entirely.
> >
> > Based on https://mapserver.org/fr/MIGRATION_GUIDE.html
> > , I see that OPACITY now
> > belongs inside a COMPOSITE object. I tried the following modifications
> > to the request URL:
> >
> >
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite=OPACITY+50
> >
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite[0]=OPACITY+50
> >
> > 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.
> >
> > Is there a way to accomplish this in MapServer 8?
> >
> > Also, does this map.layer[layername]=... syntax still work in MapServer
> > 8? The documentation at
> > https://mapserver.org/cgi/controls.html#using-mapserver-version-8
> > 
> > suggests it might no longer work for MapServer 8 (based on the heading
> > "Using MapServer version < 8"), but the documentation at
> > https://mapserver.org/pdf/MapServer.pdf
> >  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.
> >
> > Thank you,
> > Matt
> >
> > ___
> > MapServer-users mailing list
> > MapServer-users@lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS request URL with MapServer 8

2023-02-22 Thread Matthew Graber
Hi all,

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:

http://www.opengis.net/sld;
version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance; xmlns:ogc="
http://www.opengis.net/ogc; xmlns:gml="http://www.opengis.net/gml;>



test_b







default



0.5













Appreciate everyone's help!
-Matt

On Wed, Feb 22, 2023 at 11:51 AM Rahkonen Jukka <
jukka.rahko...@maanmittauslaitos.fi> wrote:

> Hi,
>
>
>
> About the SLD, opacity appears in stroke, fill, graphic, and raster in SLD
> 1.0.
>
>
>
> -Jukka Rahkonen-
>
>
>
> *Lähettäjä:* MapServer-users  
> *Puolesta
> *Steve Lime
> *Lähetetty:* keskiviikko 22. helmikuuta 2023 17.47
> *Vastaanottaja:* Matthew Graber 
> *Kopio:* mapserver-users@lists.osgeo.org
> *Aihe:* Re: [MapServer-users] Changing opacity of one layer in a
> multilayer WMS request URL with MapServer 8
>
>
>
> 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?
>
>
>
> --Steve
>
>
>
>
>
> On Tue, Feb 21, 2023 at 10:52 AM Matthew Graber 
> wrote:
>
> Hello all!
>
>
>
> With MapServer 8, I'm wondering what the proper way to change the opacity
> of a single layer in a multilayer WMS request is.
>
>
>
> For example, the following URL excerpt shows the old way of accomplishing
> this that worked while using MapServer 7:
>
>
>
>
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b]=OPACITY+50
>
>
>
> 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 "[test_b]=OPACITY+50" portion
> entirely.
>
>
>
> Based on https://mapserver.org/fr/MIGRATION_GUIDE.html
> ,
> I see that OPACITY now belongs inside a COMPOSITE object. I tried the
> following modifications to the request URL:
>
>
>
>
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite=OPACITY+50
>
>
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite[0]=OPACITY+50
>
>
>
> 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.
>
>
>
> Is there a way to accomplish this in MapServer 8?
>
>
>
> Also, does this map.layer[layername]=... syntax still work in MapServer 8?
> The documentation at
> https://mapserver.org/cgi/controls.html#using-mapserver-version-8
> 
> suggests it might no longer work for MapServer 8 (based on the heading
> "Using MapServer version < 8"), but the documentation at
> https://mapserver.org/pdf/MapServer.pdf
> 
> 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.
>
>
>
> Thank you,
>
> Matt
>
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 

Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS request URL with MapServer 8

2023-02-22 Thread Rahkonen Jukka
Hi,

About the SLD, opacity appears in stroke, fill, graphic, and raster in SLD 1.0.

-Jukka Rahkonen-

Lähettäjä: MapServer-users  Puolesta 
Steve Lime
Lähetetty: keskiviikko 22. helmikuuta 2023 17.47
Vastaanottaja: Matthew Graber 
Kopio: mapserver-users@lists.osgeo.org
Aihe: Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS 
request URL with MapServer 8

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?

--Steve


On Tue, Feb 21, 2023 at 10:52 AM Matthew Graber 
mailto:graber...@gmail.com>> wrote:
Hello all!

With MapServer 8, I'm wondering what the proper way to change the opacity of a 
single layer in a multilayer WMS request is.

For example, the following URL excerpt shows the old way of accomplishing this 
that worked while using MapServer 7:

SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b]=OPACITY+50

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 "[test_b]=OPACITY+50" portion entirely.

Based on 
https://mapserver.org/fr/MIGRATION_GUIDE.html,
 I see that OPACITY now belongs inside a COMPOSITE object. I tried the 
following modifications to the request URL:

SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite=OPACITY+50
SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite[0]=OPACITY+50

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.

Is there a way to accomplish this in MapServer 8?

Also, does this map.layer[layername]=... syntax still work in MapServer 8? The 
documentation at 
https://mapserver.org/cgi/controls.html#using-mapserver-version-8
 suggests it might no longer work for MapServer 8 (based on the heading "Using 
MapServer version < 8"), but the documentation at 
https://mapserver.org/pdf/MapServer.pdf
 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.

Thank you,
Matt
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS request URL with MapServer 8

2023-02-22 Thread Seth G
Hi,

I think OPACITY should still work at the STYLE level: 
https://mapserver.org/mapfile/style.html#mapfile-style-opacity
If you are using WMS then you could setup different styles with different 
OPACITY values, and then use named styles to select the appropriate style (with 
the STYLES= added to the WMS request). 

Seth


--
web:https://geographika.net
twitter: @geographika

On Wed, Feb 22, 2023, at 4:46 PM, Steve Lime wrote:
> 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? 
> 
> --Steve
> 
> 
> On Tue, Feb 21, 2023 at 10:52 AM Matthew Graber  wrote:
>> Hello all!
>> 
>> With MapServer 8, I'm wondering what the proper way to change the opacity of 
>> a single layer in a multilayer WMS request is.
>> 
>> For example, the following URL excerpt shows the old way of accomplishing 
>> this that worked while using MapServer 7:
>> 
>> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b]=OPACITY+50
>> 
>> 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 "[test_b]=OPACITY+50" portion entirely.
>> 
>> Based on https://mapserver.org/fr/MIGRATION_GUIDE.html, I see that OPACITY 
>> now belongs inside a COMPOSITE object. I tried the following modifications 
>> to the request URL:
>> 
>> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite=OPACITY+50
>> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite[0]=OPACITY+50
>> 
>> 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.
>> 
>> Is there a way to accomplish this in MapServer 8?
>> 
>> Also, does this map.layer[layername]=... syntax still work in MapServer 8? 
>> The documentation at 
>> https://mapserver.org/cgi/controls.html#using-mapserver-version-8 suggests 
>> it might no longer work for MapServer 8 (based on the heading "Using 
>> MapServer version < 8"), but the documentation at 
>> https://mapserver.org/pdf/MapServer.pdf 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.
>> 
>> Thank you,
>> Matt
>> ___
>> MapServer-users mailing list
>> MapServer-users@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS request URL with MapServer 8

2023-02-22 Thread Steve Lime
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?

--Steve


On Tue, Feb 21, 2023 at 10:52 AM Matthew Graber  wrote:

> Hello all!
>
> With MapServer 8, I'm wondering what the proper way to change the opacity
> of a single layer in a multilayer WMS request is.
>
> For example, the following URL excerpt shows the old way of accomplishing
> this that worked while using MapServer 7:
>
>
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b]=OPACITY+50
>
> 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 "[test_b]=OPACITY+50" portion
> entirely.
>
> Based on https://mapserver.org/fr/MIGRATION_GUIDE.html, I see that
> OPACITY now belongs inside a COMPOSITE object. I tried the following
> modifications to the request URL:
>
>
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite=OPACITY+50
>
> SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite[0]=OPACITY+50
>
> 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.
>
> Is there a way to accomplish this in MapServer 8?
>
> Also, does this map.layer[layername]=... syntax still work in MapServer 8?
> The documentation at
> https://mapserver.org/cgi/controls.html#using-mapserver-version-8
> suggests it might no longer work for MapServer 8 (based on the heading
> "Using MapServer version < 8"), but the documentation at
> https://mapserver.org/pdf/MapServer.pdf 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.
>
> Thank you,
> Matt
> ___
> MapServer-users mailing list
> MapServer-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [MapServer-users] Changing opacity of one layer in a multilayer WMS request URL with MapServer 8

2023-02-21 Thread Jeff McKenna
Wonderful to hear that you are using the MapServer.pdf!  (I actually put 
much effort into maintaining that PDF output, that but I never hear 
feedback...until someone reports a problem, like you did now, ha). 
Sometimes my updates differ from website rebuilds, will be sure to 
update the PDF for the upcoming 8.0.1 release.


Again, thanks for this report!

(also, don't be afraid to report doc issues like this at 
https://github.com/MapServer/MapServer-documentation/issues )


thanks again for the report!

-jeff




--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/



On 2023-02-21 12:52 p.m., Matthew Graber wrote:

Hello all!

With MapServer 8, I'm wondering what the proper way to change the 
opacity of a single layer in a multilayer WMS request is.


For example, the following URL excerpt shows the old way of 
accomplishing this that worked while using MapServer 7:


SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b]=OPACITY+50

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 "[test_b]=OPACITY+50" 
portion entirely.


Based on https://mapserver.org/fr/MIGRATION_GUIDE.html 
, I see that OPACITY now 
belongs inside a COMPOSITE object. I tried the following modifications 
to the request URL:


SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite=OPACITY+50
SERVICE=WMS=1.3.0=GetMap=image%2Fpng=test_a,test_b[test_b].composite[0]=OPACITY+50

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.


Is there a way to accomplish this in MapServer 8?

Also, does this map.layer[layername]=... syntax still work in MapServer 
8? The documentation at 
https://mapserver.org/cgi/controls.html#using-mapserver-version-8 
 
suggests it might no longer work for MapServer 8 (based on the heading 
"Using MapServer version < 8"), but the documentation at 
https://mapserver.org/pdf/MapServer.pdf 
 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.


Thank you,
Matt

___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users


___
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users