Hi Andrea, Ian,

Thank you for the quick answers.
Good to know, I'll set that in my sld 🙂.

And yes Ian, my output format supports transparency, as I'm using it already in 
other slds without any problem! But a good point I should have checked first.

Thank you both again 🙂

All the best,

Greg for BruGIS

________________________________
De : Andrea Aime <andrea.a...@geosolutionsgroup.com>
Envoyé : samedi 18 mai 2024 16:40
À : VANDENSCHRICK, Grégoire <gvandenschrick@urban.brussels>
Cc : geoserver-users@lists.sourceforge.net 
<geoserver-users@lists.sourceforge.net>
Objet : Re: [Geoserver-users] sld fill-opacity on mark in graphic graphic 
stroke stroke not working?

Hi Grégoire,
I can confirm it's the case... the situation is confusing, because for a 
Graphic object one can set an opacity at the Graphic level,
which does work:

                <sld:Graphic>
                  <sld:Mark>
                    <sld:WellKnownName>circle</sld:WellKnownName>
                    <sld:Fill>
                      <sld:CssParameter name="fill">#ff0000</sld:CssParameter>
                      <sld:CssParameter 
name="fill-opacity">0.5</sld:CssParameter>
                    </sld:Fill>
                  </sld:Mark>
                  <sld:Size>12</sld:Size>
                  <sld:Opacity>0.5</sld:Opacity>
                </sld:Graphic>

[image.png]

I guess that for the fill and stroke within the mark, one could multiply the 
internal opacity by the graphic's own opacity?
But right now it's not done, and the graphic opacity is overriding whatever you 
set for fill and stroke.



Regards,

Andrea Aime


==
GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead


GeoSolutions Group
phone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  339 8844549


https://www.geosolutionsgroup.com/

http://twitter.com/geosolutions_it

-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 
2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa 
che ogni circostanza inerente alla presente email (il suo contenuto, gli 
eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i 
destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per 
errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei 
comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to which it is addressed 
and may contain information that is privileged, confidential or otherwise 
protected from disclosure. We remind that - as provided by European Regulation 
2016/679 “GDPR” - copying, dissemination or use of this e-mail or the 
information herein by anyone other than the intended recipient is prohibited. 
If you have received this email by mistake, please notify us immediately by 
telephone or e-mail


On Fri, May 17, 2024 at 2:51 PM VANDENSCHRICK, Grégoire 
<gvandenschrick@urban.brussels> wrote:
Hi,

I have a rather simple sld symbology that intends to represent lines by 
circles, much like explained in the cookbook;

here is my sld:

<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor 
xmlns="http://www.opengis.net/sld"; xmlns:sld="http://www.opengis.net/sld"; 
xmlns:gml="http://www.opengis.net/gml"; xmlns:ogc="http://www.opengis.net/ogc"; 
version="1.0.0">
  <NamedLayer>
    <sld:Name>URBAN_DUP_Public_space_filter_18_bicycle</sld:Name>
    <UserStyle>
      <sld:Name>URBAN_DUP_Public_space_filter_18_bicycle</sld:Name>
      <sld:FeatureTypeStyle>
        <sld:Rule>
          <sld:Title>Bicycle PLUS
            <Localized lang="fr">V&#233;lo PLUS</Localized>
            <Localized lang="nl">Fiets PLUS</Localized>
            <Localized lang="en">Bicycle PLUS</Localized>
          </sld:Title>
          <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc";>
            <ogc:PropertyIsEqualTo>
              <ogc:PropertyName>VELO</ogc:PropertyName>
              <ogc:Literal>1</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>
          <sld:LineSymbolizer 
uom="http://www.opengeospatial.org/se/units/metre";>
            <sld:Stroke>
              <sld:GraphicStroke>
                <sld:Graphic>
                  <sld:Mark>
                    <sld:WellKnownName>circle</sld:WellKnownName>
                    <sld:Fill>
                      <sld:CssParameter name="fill">#ff0000</sld:CssParameter>
                      <sld:CssParameter 
name="fill-opacity">0.5</sld:CssParameter>
                    </sld:Fill>
                  </sld:Mark>
                  <sld:Size>40</sld:Size>
                </sld:Graphic>
              </sld:GraphicStroke>
              <CssParameter name="stroke-dasharray">40 40</CssParameter>
            </sld:Stroke>
          </sld:LineSymbolizer>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</sld:StyledLayerDescriptor>

I'm under Geoserver 2.24.2, and everything works except the fill-opacity. Is 
there a known bug there, or do I do something wrong? I did try to put a 
stroke-opacity just after the stroke-dasharray CssParameter, but it's not 
working either...

Thank you already for your ideas/help,

Greg for BruGIS
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to