[Geoserver-users] Road number labeling difficulties

Hello everybody and greetings from sunny Finland!

First of all, Geoserver is great! I'm amazed how fast it renders layergroups with almost 100 layers having different styles.

But I've got some difficulties when labeling roads and zooming the map out.
We've got some long roads with dozens of segments, all having the road number as an attribute.
I want the road number labels to be show along the long road with an equals distance from each other.

* When I zoom in with just two or three segments visible, the VendorOption "repeat" is enough. The labels are displayed nicely along the road (sample1.png).
* When I zoom out, I can not label all the segments anymore because the labels come too close to each other (sample2.png). So I will add VendorOption "group". But it only shows the labels in the longest path and not the labels on the other (possible slightly disjoint) segments (sample3.png).
* Then I add "labelAllGroup". But again, I get too much labels because every segment will have it (sample4.png).

(The example data is tiger_roads with only Broadway visible and an imaginary road number "R11" for all the segments.)

So, how can I display the labels along all the visible road segments, not too close or not too far away from each other?

Thank you!

Best regards,
    Anssi Kanninen

sample1.png

sample2.png

sample3.png

sample4.png

This is the style I used. Labeling options are in the bottom:

-----8<-----8<-----8<----8<----

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
                       xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
                       xmlns="http://www.opengis.net/sld&quot; xmlns:ogc="http://www.opengis.net/ogc&quot;
                       xmlns:xlink="http://www.w3.org/1999/xlink&quot;
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <NamedLayer> <Name> area landmarks </Name>
  <UserStyle>
    <FeatureTypeStyle>
      <FeatureTypeName>Feature</FeatureTypeName>
      <Rule>
        <ogc:Filter>
          <ogc:PropertyIsEqualTo>
            <ogc:PropertyName>NAME</ogc:PropertyName>
            <ogc:Literal>Broadway</ogc:Literal>
          </ogc:PropertyIsEqualTo>
        </ogc:Filter>
        <!-- <MinScaleDenominator>32000</MinScaleDenominator> -->
        <LineSymbolizer>
          <Stroke>
            <CssParameter name="stroke">
              <ogc:Literal>#666666</ogc:Literal>
            </CssParameter>
            <CssParameter name="stroke-width">
              <ogc:Literal>2</ogc:Literal>
            </CssParameter>
          </Stroke>
        </LineSymbolizer>
      </Rule>
      
      <Rule> <!-- thick line drawn first-->
        <ogc:Filter>
          <ogc:PropertyIsEqualTo>
            <ogc:PropertyName>NAME</ogc:PropertyName>
            <ogc:Literal>Broadway</ogc:Literal>
          </ogc:PropertyIsEqualTo>
        </ogc:Filter>
        <!-- <MaxScaleDenominator>32000</MaxScaleDenominator> -->
        <LineSymbolizer>
          <Stroke>
            <CssParameter name="stroke">
              <ogc:Literal>#666666</ogc:Literal>
            </CssParameter>
            <CssParameter name="stroke-width">
              <ogc:Literal>7</ogc:Literal>
            </CssParameter>
          </Stroke>
        </LineSymbolizer>
      </Rule>
    </FeatureTypeStyle>
    <FeatureTypeStyle>
      <FeatureTypeName>Feature</FeatureTypeName>
      <Rule> <!-- thin line drawn second -->
        <ogc:Filter>
          <ogc:PropertyIsEqualTo>
            <ogc:PropertyName>NAME</ogc:PropertyName>
            <ogc:Literal>Broadway</ogc:Literal>
          </ogc:PropertyIsEqualTo>
        </ogc:Filter>
        <!-- <MaxScaleDenominator>32000</MaxScaleDenominator> -->
        <LineSymbolizer>
          <Stroke>
            <CssParameter name="stroke">
              <ogc:Literal>#FFFFFF</ogc:Literal>
            </CssParameter>
            <CssParameter name="stroke-width">
              <ogc:Literal>4</ogc:Literal>
            </CssParameter>
          </Stroke>
        </LineSymbolizer>
      </Rule>
      <!-- label -->
      <Rule>
        <ogc:Filter>
          <ogc:PropertyIsEqualTo>
            <ogc:PropertyName>NAME</ogc:PropertyName>
            <ogc:Literal>Broadway</ogc:Literal>
          </ogc:PropertyIsEqualTo>
        </ogc:Filter>
        <!-- <MaxScaleDenominator>32000</MaxScaleDenominator> -->
        <TextSymbolizer>
          <Label>
            <ogc:Literal>R11</ogc:Literal>
          </Label>
          
          <Font>
            <CssParameter name="font-family">Times New Roman</CssParameter>
            <CssParameter name="font-style">Normal</CssParameter>
            <CssParameter name="font-size">14</CssParameter>
            <CssParameter name="font-weight">bold</CssParameter>
          </Font>
          
          <LabelPlacement>
            <LinePlacement>
            </LinePlacement>
          </LabelPlacement>
          <Halo>
            <Radius>
              <ogc:Literal>2</ogc:Literal>
            </Radius>
            <Fill>
              <CssParameter name="fill">#FFFFFF</CssParameter>
              <CssParameter name="fill-opacity">0.85</CssParameter>
            </Fill>
          </Halo>
          
          <Fill>
            <CssParameter name="fill">#000000</CssParameter>
          </Fill>
          
          <VendorOption name="repeat">100</VendorOption>
          <VendorOption name="group">true</VendorOption>
          <VendorOption name="labelAllGroup">true</VendorOption>
          
        </TextSymbolizer>
      </Rule>
    </FeatureTypeStyle>
    
  </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

----8<-----8<-----8<-----8<-----8<-----

-----Original Message-----
From: Kanninen Anssi EXT [mailto:Anssi.Kanninen@anonymised.com]
Sent: 30. kesäkuuta 2016 11:47
To: 'geoserver-users@lists.sourceforge.net'
Subject: [Geoserver-users] Road number labeling difficulties

Hello everybody and greetings from sunny Finland!

First of all, Geoserver is great! I'm amazed how fast it renders layergroups with almost 100 layers having different styles.

But I've got some difficulties when labeling roads and zooming the map out.
We've got some long roads with dozens of segments, all having the road number as an attribute.
I want the road number labels to be show along the long road with an equals distance from each other.

* When I zoom in with just two or three segments visible, the VendorOption "repeat" is enough. The labels are displayed nicely along the road (sample1.png).
* When I zoom out, I can not label all the segments anymore because the labels come too close to each other (sample2.png). So I will add VendorOption "group". But it only shows the labels in the longest path and not the labels on the other (possible slightly disjoint) segments (sample3.png).
* Then I add "labelAllGroup". But again, I get too much labels because every segment will have it (sample4.png).

(The example data is tiger_roads with only Broadway visible and an imaginary road number "R11" for all the segments.)

So, how can I display the labels along all the visible road segments, not too close or not too far away from each other?

Thank you!

Best regards,
    Anssi Kanninen

We once had minGroupDistance - any idea where it vanished?

-----Original Message-----
From: Kanninen Anssi EXT [mailto:Anssi.Kanninen@anonymised.com]
Sent: 30. kesäkuuta 2016 12:10
To: 'geoserver-users@lists.sourceforge.net'
Subject: Re: [Geoserver-users] Road number labeling difficulties

This is the style I used. Labeling options are in the bottom:

-----8<-----8<-----8<----8<----

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
                       xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
                       xmlns="http://www.opengis.net/sld&quot; xmlns:ogc="http://www.opengis.net/ogc&quot;
                       xmlns:xlink="http://www.w3.org/1999/xlink&quot;
                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
  <NamedLayer> <Name> area landmarks </Name>
  <UserStyle>
    <FeatureTypeStyle>
      <FeatureTypeName>Feature</FeatureTypeName>
      <Rule>
        <ogc:Filter>
          <ogc:PropertyIsEqualTo>
            <ogc:PropertyName>NAME</ogc:PropertyName>
            <ogc:Literal>Broadway</ogc:Literal>
          </ogc:PropertyIsEqualTo>
        </ogc:Filter>
        <!-- <MinScaleDenominator>32000</MinScaleDenominator> -->
        <LineSymbolizer>
          <Stroke>
            <CssParameter name="stroke">
              <ogc:Literal>#666666</ogc:Literal>
            </CssParameter>
            <CssParameter name="stroke-width">
              <ogc:Literal>2</ogc:Literal>
            </CssParameter>
          </Stroke>
        </LineSymbolizer>
      </Rule>
      
      <Rule> <!-- thick line drawn first-->
        <ogc:Filter>
          <ogc:PropertyIsEqualTo>
            <ogc:PropertyName>NAME</ogc:PropertyName>
            <ogc:Literal>Broadway</ogc:Literal>
          </ogc:PropertyIsEqualTo>
        </ogc:Filter>
        <!-- <MaxScaleDenominator>32000</MaxScaleDenominator> -->
        <LineSymbolizer>
          <Stroke>
            <CssParameter name="stroke">
              <ogc:Literal>#666666</ogc:Literal>
            </CssParameter>
            <CssParameter name="stroke-width">
              <ogc:Literal>7</ogc:Literal>
            </CssParameter>
          </Stroke>
        </LineSymbolizer>
      </Rule>
    </FeatureTypeStyle>
    <FeatureTypeStyle>
      <FeatureTypeName>Feature</FeatureTypeName>
      <Rule> <!-- thin line drawn second -->
        <ogc:Filter>
          <ogc:PropertyIsEqualTo>
            <ogc:PropertyName>NAME</ogc:PropertyName>
            <ogc:Literal>Broadway</ogc:Literal>
          </ogc:PropertyIsEqualTo>
        </ogc:Filter>
        <!-- <MaxScaleDenominator>32000</MaxScaleDenominator> -->
        <LineSymbolizer>
          <Stroke>
            <CssParameter name="stroke">
              <ogc:Literal>#FFFFFF</ogc:Literal>
            </CssParameter>
            <CssParameter name="stroke-width">
              <ogc:Literal>4</ogc:Literal>
            </CssParameter>
          </Stroke>
        </LineSymbolizer>
      </Rule>
      <!-- label -->
      <Rule>
        <ogc:Filter>
          <ogc:PropertyIsEqualTo>
            <ogc:PropertyName>NAME</ogc:PropertyName>
            <ogc:Literal>Broadway</ogc:Literal>
          </ogc:PropertyIsEqualTo>
        </ogc:Filter>
        <!-- <MaxScaleDenominator>32000</MaxScaleDenominator> -->
        <TextSymbolizer>
          <Label>
            <ogc:Literal>R11</ogc:Literal>
          </Label>
          
          <Font>
            <CssParameter name="font-family">Times New Roman</CssParameter>
            <CssParameter name="font-style">Normal</CssParameter>
            <CssParameter name="font-size">14</CssParameter>
            <CssParameter name="font-weight">bold</CssParameter>
          </Font>
          
          <LabelPlacement>
            <LinePlacement>
            </LinePlacement>
          </LabelPlacement>
          <Halo>
            <Radius>
              <ogc:Literal>2</ogc:Literal>
            </Radius>
            <Fill>
              <CssParameter name="fill">#FFFFFF</CssParameter>
              <CssParameter name="fill-opacity">0.85</CssParameter>
            </Fill>
          </Halo>
          
          <Fill>
            <CssParameter name="fill">#000000</CssParameter>
          </Fill>
          
          <VendorOption name="repeat">100</VendorOption>
          <VendorOption name="group">true</VendorOption>
          <VendorOption name="labelAllGroup">true</VendorOption>
          
        </TextSymbolizer>
      </Rule>
    </FeatureTypeStyle>
    
  </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

----8<-----8<-----8<-----8<-----8<-----

-----Original Message-----
From: Kanninen Anssi EXT [mailto:Anssi.Kanninen@anonymised.com]
Sent: 30. kesäkuuta 2016 11:47
To: 'geoserver-users@lists.sourceforge.net'
Subject: [Geoserver-users] Road number labeling difficulties

Hello everybody and greetings from sunny Finland!

First of all, Geoserver is great! I'm amazed how fast it renders layergroups with almost 100 layers having different styles.

But I've got some difficulties when labeling roads and zooming the map out.
We've got some long roads with dozens of segments, all having the road number as an attribute.
I want the road number labels to be show along the long road with an equals distance from each other.

* When I zoom in with just two or three segments visible, the VendorOption "repeat" is enough. The labels are displayed nicely along the road (sample1.png).
* When I zoom out, I can not label all the segments anymore because the labels come too close to each other (sample2.png). So I will add VendorOption "group". But it only shows the labels in the longest path and not the labels on the other (possible slightly disjoint) segments (sample3.png).
* Then I add "labelAllGroup". But again, I get too much labels because every segment will have it (sample4.png).

(The example data is tiger_roads with only Broadway visible and an imaginary road number "R11" for all the segments.)

So, how can I display the labels along all the visible road segments, not too close or not too far away from each other?

Thank you!

Best regards,
    Anssi Kanninen

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi,
are there screenshots you’re posting from a tiling client? Does the labeling work fine if you look at the GeoServer layer preview without tiling enabled?
The solution should be group, group all with an eventual repeat, but if you are tiling there is one labelling run per tile, the system is not aware
of what happens in the nearby tiles.
The minGroupDistance option is still there and I see it used in the code.

Cheers
Andrea

···

On Thu, Jun 30, 2016 at 10:46 AM, Kanninen Anssi EXT <Anssi.Kanninen@anonymised.com> wrote:

Hello everybody and greetings from sunny Finland!

First of all, Geoserver is great! I’m amazed how fast it renders layergroups with almost 100 layers having different styles.

But I’ve got some difficulties when labeling roads and zooming the map out.
We’ve got some long roads with dozens of segments, all having the road number as an attribute.
I want the road number labels to be show along the long road with an equals distance from each other.

  • When I zoom in with just two or three segments visible, the VendorOption “repeat” is enough. The labels are displayed nicely along the road (sample1.png).
  • When I zoom out, I can not label all the segments anymore because the labels come too close to each other (sample2.png). So I will add VendorOption “group”. But it only shows the labels in the longest path and not the labels on the other (possible slightly disjoint) segments (sample3.png).
  • Then I add “labelAllGroup”. But again, I get too much labels because every segment will have it (sample4.png).

(The example data is tiger_roads with only Broadway visible and an imaginary road number “R11” for all the segments.)

So, how can I display the labels along all the visible road segments, not too close or not too far away from each other?

Thank you!

Best regards,
Anssi Kanninen


Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


Hi Andrea and thank you for the answer!

The screenshots are from Geoserver layer preview without any tiling enabled.

If I use grouping with repeating, it only shows the labels in the longest path.

If I add “labelAllGroups”, there’s too much of labels, too close to each other.

Best regards,

Anssi

···

Hi,

are there screenshots you’re posting from a tiling client? Does the labeling work fine if you look at the GeoServer layer preview without tiling enabled?

The solution should be group, group all with an eventual repeat, but if you are tiling there is one labelling run per tile, the system is not aware

of what happens in the nearby tiles.

The minGroupDistance option is still there and I see it used in the code.

Cheers

Andrea

On Thu, Jun 30, 2016 at 10:46 AM, Kanninen Anssi EXT <Anssi.Kanninen@…7714…> wrote:

Hello everybody and greetings from sunny Finland!

First of all, Geoserver is great! I’m amazed how fast it renders layergroups with almost 100 layers having different styles.

But I’ve got some difficulties when labeling roads and zooming the map out.
We’ve got some long roads with dozens of segments, all having the road number as an attribute.
I want the road number labels to be show along the long road with an equals distance from each other.

  • When I zoom in with just two or three segments visible, the VendorOption “repeat” is enough. The labels are displayed nicely along the road (sample1.png).
  • When I zoom out, I can not label all the segments anymore because the labels come too close to each other (sample2.png). So I will add VendorOption “group”. But it only shows the labels in the longest path and not the labels on the other (possible slightly disjoint) segments (sample3.png).
  • Then I add “labelAllGroup”. But again, I get too much labels because every segment will have it (sample4.png).

(The example data is tiger_roads with only Broadway visible and an imaginary road number “R11” for all the segments.)

So, how can I display the labels along all the visible road segments, not too close or not too far away from each other?

Thank you!

Best regards,
Anssi Kanninen


Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape


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

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Fri, Jul 1, 2016 at 3:17 PM, Kanninen Anssi EXT <Anssi.Kanninen@anonymised.com..

wrote:

Hi Andrea and thank you for the answer!

The screenshots are from Geoserver layer preview without any tiling
enabled.

If I use grouping with repeating, it only shows the labels in the longest
path.

If I add “labelAllGroups”, there’s too much of labels, too close to each
other.

Hum... GeoServer uses JTS to put toghether the line segments into a long
line... normally it works,
when it does not, it's normally and indication that the lines are not
really touching each other,
which makes JTS unable to bring them toghether into a single long line.
Could that be your case?

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

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

Hi Andrea!

There may indeed be some discontinuation between the segments but what would that change? I still want the labels have an equal space between them.

The example data in my screenshots is the example data provided by Geoserver so I assume it is be valid.

Cheers!

  • Anssi
···

On Fri, Jul 1, 2016 at 3:17 PM, Kanninen Anssi EXT <Anssi.Kanninen@…7714…> wrote:

Hi Andrea and thank you for the answer!

The screenshots are from Geoserver layer preview without any tiling enabled.

If I use grouping with repeating, it only shows the labels in the longest path.

If I add “labelAllGroups”, there’s too much of labels, too close to each other.

Hum… GeoServer uses JTS to put toghether the line segments into a long line… normally it works,

when it does not, it’s normally and indication that the lines are not really touching each other,

which makes JTS unable to bring them toghether into a single long line.

Could that be your case?

Cheers

Andrea

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Sun, Jul 3, 2016 at 9:31 PM, Kanninen Anssi EXT <Anssi.Kanninen@anonymised.com..

wrote:

Hi Andrea!

There may indeed be some discontinuation between the segments but what
would that change? I still want the labels have an equal space between them.

It would allow the JTS LineMerge algorithm to create one single large line,
that is then labelled according to the other directives (repeate)

The example data in my screenshots is the example data provided by
Geoserver so I assume it is be valid.

Err... that data has been heavily simplified to keep the size of the
download small, so I would not
count on it being valid.

That said, I re-read your first mail properly (10pm saturday night, I'm not
in a rush like in a usual work day) and took the time
to actually setup the style on a demo server:
http://demo.geo-solutions.it/geoserver/tiger/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger:tiger_roads&styles=r11&bbox=-74.02722,40.684221,-73.907005,40.878178&width=476&height=768&srs=EPSG:4326&format=application/openlayers#toggle

At least in some parts the data is actually disconnected, or otherwise not
forming a single line, e.g.:
http://demo.geo-solutions.it/geoserver/tiger/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&STYLES=r11&LAYERS=tiger%3Atiger_roads&SRS=EPSG%3A4326&WIDTH=1600&HEIGHT=768&BBOX=-73.99920701980591%2C40.75648784637451%2C-73.96487474441528%2C40.77296733856201

http://demo.geo-solutions.it/geoserver/tiger/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&STYLES=r11&LAYERS=tiger%3Atiger_roads&SRS=EPSG%3A4326&WIDTH=950&HEIGHT=600&BBOX=-73.9958381652832%2C40.73277711868286%2C-73.98564577102661%2C40.7392144203186

http://demo.geo-solutions.it/geoserver/tiger/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&STYLES=r11&LAYERS=tiger%3Atiger_roads&SRS=EPSG%3A4326&WIDTH=950&HEIGHT=600&BBOX=-74.01639461517334%2C40.70351421833038%2C-74.01129841804504%2C40.706732869148254

In other cases however it might a numeric issue, since by the time the
labeller gets the lines they have been generalized and transformed to
screen space, but
with different roundings (what was touching before might not be exactly
touching after). I did not
investigate further, but there might be room for improvement there... I'm
not sure it's going to be a quick fix however, I guess
we'd have to round all ordinates to the nearest pixel before trying to
attempt the LineMerge.
That said, it's speculation, might be something else.

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

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

I think my problem could be solved by minGroupDistance but that option doesn’t seem to do anything in Geoserver 2.9.0.

···

On Sun, Jul 3, 2016 at 9:31 PM, Kanninen Anssi EXT <Anssi.Kanninen@…7714…> wrote:

Hi Andrea!

There may indeed be some discontinuation between the segments but what would that change? I still want the labels have an equal space between them.

It would allow the JTS LineMerge algorithm to create one single large line, that is then labelled according to the other directives (repeate)

The example data in my screenshots is the example data provided by Geoserver so I assume it is be valid.

Err… that data has been heavily simplified to keep the size of the download small, so I would not

count on it being valid.

That said, I re-read your first mail properly (10pm saturday night, I’m not in a rush like in a usual work day) and took the time

to actually setup the style on a demo server:

http://demo.geo-solutions.it/geoserver/tiger/wms?service=WMS&version=1.1.0&request=GetMap&layers=tiger:tiger_roads&styles=r11&bbox=-74.02722,40.684221,-73.907005,40.878178&width=476&height=768&srs=EPSG:4326&format=application/openlayers#toggle

At least in some parts the data is actually disconnected, or otherwise not forming a single line, e.g.:

http://demo.geo-solutions.it/geoserver/tiger/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&STYLES=r11&LAYERS=tiger%3Atiger_roads&SRS=EPSG%3A4326&WIDTH=1600&HEIGHT=768&BBOX=-73.99920701980591%2C40.75648784637451%2C-73.96487474441528%2C40.77296733856201

http://demo.geo-solutions.it/geoserver/tiger/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&STYLES=r11&LAYERS=tiger%3Atiger_roads&SRS=EPSG%3A4326&WIDTH=950&HEIGHT=600&BBOX=-73.9958381652832%2C40.73277711868286%2C-73.98564577102661%2C40.7392144203186

http://demo.geo-solutions.it/geoserver/tiger/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&STYLES=r11&LAYERS=tiger%3Atiger_roads&SRS=EPSG%3A4326&WIDTH=950&HEIGHT=600&BBOX=-74.01639461517334%2C40.70351421833038%2C-74.01129841804504%2C40.706732869148254

In other cases however it might a numeric issue, since by the time the labeller gets the lines they have been generalized and transformed to screen space, but

with different roundings (what was touching before might not be exactly touching after). I did not

investigate further, but there might be room for improvement there… I’m not sure it’s going to be a quick fix however, I guess

we’d have to round all ordinates to the nearest pixel before trying to attempt the LineMerge.

That said, it’s speculation, might be something else.

Cheers

Andrea

==

GeoServer Professional Services from the experts! Visit

http://goo.gl/it488V for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Mon, Jul 4, 2016 at 11:44 AM, Kanninen Anssi EXT <
Anssi.Kanninen@anonymised.com> wrote:

I think my problem could be solved by minGroupDistance but that option
doesn’t seem to do anything in Geoserver 2.9.0.

I can assure you there is code using that option, I don't know why it's not
activating... I'd suggest you open a ticket
at https://osgeo-org.atlassian.net/projects/GEOS/issues so that we don't
forget about this issue.

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

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

I’ve created a bug report here:

https://osgeo-org.atlassian.net/browse/GEOS-7625

Cheers
Andrea

···

On Mon, Jul 4, 2016 at 1:46 PM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Mon, Jul 4, 2016 at 11:44 AM, Kanninen Anssi EXT <Anssi.Kanninen@anonymised.com> wrote:

I think my problem could be solved by minGroupDistance but that option doesn’t seem to do anything in Geoserver 2.9.0.

I can assure you there is code using that option, I don’t know why it’s not activating… I’d suggest you open a ticket
at https://osgeo-org.atlassian.net/projects/GEOS/issues so that we don’t forget about this issue.

Cheers

Andrea

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
phone: +39 0584 962313

fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.