[Geoserver-users] Styled marks shape dot does not work in geoserver version 2.23.1

Hi,

I noticed that the styled mark shape://dot doesn’t work in GeoServer version 2.23.1.

I’ve tried both creating a style with CSS and SLD. In version 2.22.2 everything worked fine.

Below is an example of a style created using CSS.

@mode ‘Auto’;
@styleTitle ‘Test’;
@styleAbstract ‘Test’;

/* @title Test

  • @abstract Test
    */
    *{
    stroke: #a0a0f5;
    stroke-width: 1;
    fill: symbol(“shape://dot”);
    :fill {
    size: 5;
    stroke: #a0a0f5;
    stroke-width: 1;
    fill: #a0a0f5;
    }
    }

Dear all,

To the mail thread.

I would like to know what are the advantages or disadvantages of styling using css or sld?

Thanks.

Miguel Ángel.

···

De: Daniele Maggiolo via Geoserver-users geoserver-users@lists.sourceforge.net
Enviado el: martes, 20 de junio de 2023 15:26
Para: geoserver-users@lists.sourceforge.net
Asunto: [Externo] [Geoserver-users] Styled marks shape dot does not work in geoserver version 2.23.1



ADVERTENCIA: Este correo electrónico se originó fuera de Tracasa Instrumental. No pinches en enlaces, abras ficheros adjuntos o respondas si no reconoces al emisor y no tienes la certeza de que el contenido es seguro.

Hi,

I noticed that the styled mark shape://dot doesn’t work in GeoServer version 2.23.1.

I’ve tried both creating a style with CSS and SLD. In version 2.22.2 everything worked fine.

Below is an example of a style created using CSS.

@mode ‘Auto’;
@styleTitle ‘Test’;
@styleAbstract ‘Test’;

/* @title Test

  • @abstract Test
    */
    *{
    stroke: #a0a0f5;
    stroke-width: 1;
    fill: symbol(“shape://dot”);
    :fill {
    size: 5;
    stroke: #a0a0f5;
    stroke-width: 1;
    fill: #a0a0f5;
    }
    }

This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.

can you give us any clues as to what doesn’t work? is nothing drawn? does the program crash? is a penguin produced?

What does the log file show any interesting information? what if you turn logging up to GeoTools-dev level and try again?

Ian

···

Ian Turton

On Tue, 20 Jun 2023 at 17:13, Miguel Ángel Parrilla Godínez via Geoserver-users <geoserver-users@anonymised.comt> wrote:

Dear all,

To the mail thread.

I would like to know what are the advantages or disadvantages of styling using css or sld?

SLD is machine readable and does exactly what you asked for and nothing else, css is human readable and does lots of things while you aren’t watching but many people claim it is easier to use. It can be slower especially for complex styles (as they are converted in to SLD in the background)

Ian

Thanks Ian.

Miguel Ángel.

···

De: Ian Turton <ijturton@…84…>
Enviado el: martes, 20 de junio de 2023 18:16
Para: Miguel Ángel Parrilla Godínez <maparrilla@…10017…>
CC: geoserver-users@lists.sourceforge.net
Asunto: Re: [Externo] [Geoserver-users] Styled marks shape dot does not work in geoserver version 2.23.1



ADVERTENCIA: Este correo electrónico se originó fuera de Tracasa Instrumental. No pinches en enlaces, abras ficheros adjuntos o respondas si no reconoces al emisor y no tienes la certeza de que el contenido es seguro.

On Tue, 20 Jun 2023 at 17:13, Miguel Ángel Parrilla Godínez via Geoserver-users <geoserver-users@lists.sourceforge.net> wrote:

Dear all,

To the mail thread.

I would like to know what are the advantages or disadvantages of styling using css or sld?

SLD is machine readable and does exactly what you asked for and nothing else, css is human readable and does lots of things while you aren’t watching but many people claim it is easier to use. It can be slower especially for complex styles (as they are converted in to SLD in the background)

Ian


This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.

I also recommend YSLD as the best of both worlds. To compare I recommend the style workshop exercises which produce the same content in each styling flavour.

YSLD

  1. It is a one-to-one mapping to SLD (so it does exactly what you ask) and it is not in XML (why SDL indeed). It uses indentation to communicate the structure rather than XML tags.

  2. It is also willing to fill in the blanks for boiler-plate XML that is not very interesting (so only write what you need):

From line exercise:

line:
stroke-color: blue
stroke-width: 2px
stroke-dasharray: 5 2

  1. You can also define and reuse snippets to prevent having to copy and paste

define: &stroke
stroke-color: ‘gray’
stroke-width: 0.5
rules:

  • filter: ${mapcolor9 = ‘1’}
    scale: [min, max]
    symbolizers:
  • polygon:
    <<: *stroke
    fill-color: ‘#8DD3C7
  • filter: ${mapcolor9 = ‘2’}
    scale: [min, max]
    symbolizers:
  • polygon:
    <<: *stroke
    fill-color: ‘#FFFFB3
  1. Tip: Also you can convert between different styles using GeoServer REST API:

To access the default data directory SLD:

To convert to YSLD:

The same approach can be used to convert a YSLD style to SLD if you wish to go back to plain SLD.
This also works for converting CSS to YSLD or SLD (so please experiment without fear of lock-in forever).

Just do not write SLD by hand :slight_smile:

···


Jody Garnett

Hi, the result I get is a polygon without filling with dots.

If I use shape://slash it works like it always did in all versions (showing me the lines as a fill of the polygon). The only one I can’t get to work anymore is shape://dot (in 2.23.1 version).

Daniele

···

Da: Ian Turton <ijturton@…84…>
Inviato: martedì 20 giugno 2023 18:11
A: Daniele Maggiolo <daniele.maggiolo@…9165…>
Cc: geoserver-users@lists.sourceforge.net
Oggetto: Re: [Geoserver-users] Styled marks shape dot does not work in geoserver version 2.23.1

can you give us any clues as to what doesn’t work? is nothing drawn? does the program crash? is a penguin produced?

What does the log file show any interesting information? what if you turn logging up to GeoTools-dev level and try again?

Ian

On Tue, 20 Jun 2023 at 16:05, Daniele Maggiolo via Geoserver-users <geoserver-users@lists.sourceforge.net> wrote:

Hi,

I noticed that the styled mark shape://dot doesn’t work in GeoServer version 2.23.1.

I’ve tried both creating a style with CSS and SLD. In version 2.22.2 everything worked fine.

Below is an example of a style created using CSS.

@mode ‘Auto’;
@styleTitle ‘Test’;
@styleAbstract ‘Test’;

/* @title Test

  • @abstract Test
    */
    *{
    stroke: #a0a0f5;
    stroke-width: 1;
    fill: symbol(“shape://dot”);
    :fill {
    size: 5;
    stroke: #a0a0f5;
    stroke-width: 1;
    fill: #a0a0f5;
    }
    }

Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

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

Ian Turton

I can confirm that the dot pattern doesn’t seem to work in 2.22.2 either but the relevant code (https://github.com/geotools/geotools/blame/379ae1335ebfba758a03b61be97a20be838900e3/modules/library/render/src/main/java/org/geotools/renderer/style/ShapeMarkFactory.java#L47) doesn’t seem to have changed in more than 5 years.

Looking at the logs seems to indicate that the renderer looks through some (all) the MarkFactories and finds the mark and draws it

22 Jun 08:30:34 TRACE [renderer.style] - fetching mark of name shape://dot
22 Jun 08:30:34 TRACE [renderer.style] - Could not find the symbol, returning null
22 Jun 08:30:34 TRACE [renderer.style] - fetching mark of name shape://dot
22 Jun 08:30:34 TRACE [renderer.style] - applying stroke to mark

So it looks like something odd is happening, if you can raise a bug someone may look at it, though probably not this coming week as its FOSS4G

Ian

···

Ian Turton

Thinking out loud, could it be that something environmental changed then? Like, for example, the JDK in use?

Cheers
Andrea

···

Ian Turton

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

Thinking out loud, could it be that something environmental changed then? Like, for example, the JDK in use?

I’m on Ubuntu: 11.0.19 (OpenJDK 64-Bit Server VM)

Ian

···

Ian Turton

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

Ian Turton

Hi Daniele,

We had the same version. It does not work. In older versions it worked.

We have try this. It works:

ttf://Wingdings#108

<CssParameter name=“fill”>#000000

1

1

0

<VendorOption name=“graphic-margin”>2

Regards.

Miguel Ángel.

···

De: Daniele Maggiolo via Geoserver-users geoserver-users@lists.sourceforge.net
Enviado el: jueves, 22 de junio de 2023 8:41
Para: Ian Turton <ijturton@…84…>
CC: geoserver-users@lists.sourceforge.net
Asunto: [Externo] [Geoserver-users] R: Styled marks shape dot does not work in geoserver version 2.23.1



ADVERTENCIA: Este correo electrónico se originó fuera de Tracasa Instrumental. No pinches en enlaces, abras ficheros adjuntos o respondas si no reconoces al emisor y no tienes la certeza de que el contenido es seguro.

Hi, the result I get is a polygon without filling with dots.

If I use shape://slash it works like it always did in all versions (showing me the lines as a fill of the polygon). The only one I can’t get to work anymore is shape://dot (in 2.23.1 version).

Daniele

Da: Ian Turton <ijturton@…84…>
Inviato: martedì 20 giugno 2023 18:11
A: Daniele Maggiolo <daniele.maggiolo@…9165…>
Cc: geoserver-users@lists.sourceforge.net
Oggetto: Re: [Geoserver-users] Styled marks shape dot does not work in geoserver version 2.23.1

can you give us any clues as to what doesn’t work? is nothing drawn? does the program crash? is a penguin produced?

What does the log file show any interesting information? what if you turn logging up to GeoTools-dev level and try again?

Ian

On Tue, 20 Jun 2023 at 16:05, Daniele Maggiolo via Geoserver-users <geoserver-users@lists.sourceforge.net> wrote:

Hi,

I noticed that the styled mark shape://dot doesn’t work in GeoServer version 2.23.1.

I’ve tried both creating a style with CSS and SLD. In version 2.22.2 everything worked fine.

Below is an example of a style created using CSS.

@mode ‘Auto’;
@styleTitle ‘Test’;
@styleAbstract ‘Test’;

/* @title Test

  • @abstract Test
    */
    *{
    stroke: #a0a0f5;
    stroke-width: 1;
    fill: symbol(“shape://dot”);
    :fill {
    size: 5;
    stroke: #a0a0f5;
    stroke-width: 1;
    fill: #a0a0f5;
    }
    }

Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:

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

Ian Turton


This email has been scanned for spam and viruses by Proofpoint Essentials. Click here to report this email as spam.

Just a general reminder that if you find a problem in GeoServer please let us know, even if you have a workaround in place. There is absolutely no chance of it getting fixed if the developers don’t know about it.

Ian

···

Ian Turton

I’ve created https://osgeo-org.atlassian.net/browse/GEOS-11046 if any one wants to look at this or follow along

Ian

···

Ian Turton

Ian Turton