Re: [Geoserver-users] Line with perpendicular offset in legend

2024-04-11 Thread Andrea Aime
Hi Cécile,
yes it should be doable... with some changes.

The offset for lines and polygons is actually managed inside
StreamingRenderer, around line 3050+,
and the BufferedImageLegendGraphicBuilder does not employ one, it calls
directly StyledShapePainter.

One approach is to move the offset handling from StreamingRenderer down to
StyledShapePainter.
The other possibility is to extract the offset handling into a static
utility method that
BufferedImageLegendGraphicBuilder can use, in case there is an offset.

The former seems cleaner, but has a higher chance of unwanted side effects.

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 Thu, Apr 11, 2024 at 1:55 PM Cécile Vuilleumier <
cecile.vuilleum...@camptocamp.com> wrote:

> Hi all
>
> I have a question regarding perpendicular offset of line symbolizers in
> legends.
> When using a symbolizer with no offset and another one with an offset, we
> see both symbols on top of another (without offset) in the legend. The
> discrepancy between the symbols on the map and in the legend might be a bit
> confusing. See an example at the bottom of this message.
>
> Could we imagine taking into account the offset in the legend?
> We already had a similar question regarding symbols at the beginning / the
> end of lines, so I can imagine it's not something doable but figured it's
> worth to ask the question.
>
> Cheers, Cécile
>
> Example SLD:
>
> 
> http://www.opengis.net/sld;
>  xmlns:ogc="http://www.opengis.net/ogc;
>  xmlns:xlink="http://www.w3.org/1999/xlink;
>  xmlns:xsi=
> "http://www.w3.org/2001/XMLSchema-instance;
>  
> xsi:schemaLocation="http://www.opengis.net/sld
> StyledLayerDescriptor.xsd"
> >
>   
> line
> 
>   Line
>   
> 
>   line
>   line
>   
> 
>   #0070ff
>   6
>   0.7
> 
> 3
>   
>   
> 
>   #00
>   1
>   0.7
> 
> 0
>   
> 
>   
> 
>   
> 
>
> Result in style preview:
>
>
> --
> *camptocamp*
>
>
> *Cécile Vuilleumier *
> Geospatial developer
> www.camptocamp.com
> ___
> 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
>
___
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

[Geoserver-users] Line with perpendicular offset in legend

2024-04-11 Thread Cécile Vuilleumier

Hi all

I have a question regarding perpendicular offset of line symbolizers in 
legends.
When using a symbolizer with no offset and another one with an offset, 
we see both symbols on top of another (without offset) in the legend. 
The discrepancy between the symbols on the map and in the legend might 
be a bit confusing. See an example at the bottom of this message.


Could we imagine taking into account the offset in the legend?
We already had a similar question regarding symbols at the beginning / 
the end of lines, so I can imagine it's not something doable but figured 
it's worth to ask the question.


Cheers, Cécile

Example SLD:


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

  
    line
    
  Line
  
    
  line
  line
  
    
  #0070ff
  6
  0.7
    
    3
  
  
    
  #00
  1
  0.7
    
    0
  
    
  
    
  


Result in style preview:


--
*camptocamp*

*Cécile Vuilleumier
*
Geospatial developer
www.camptocamp.com ___
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