[Geoserver-users] [SLD] Labeling no repeat

Hi list,

According to the documentation [1] GeoServer labels each line only once. And if you want to repeat the label (for long lines) you should add the repeat vender option with a positive value (the number of pixels).

That’s not what I’m experiencing. In each of the following 3 scenarios I get the same image (with a repeated label):

  1. Text symbolizer without repeat vender option

  2. Text symbolizer with 150 (only in this scenario I would expect the label repetition)

  3. Text symbolizer with -1

What am I missing here? I’m using a 2.5-SNAPSHOT (will upgrade to stable 2.5.1 later today).

[1] http://docs.geoserver.org/latest/en/user/styling/sld-reference/labeling.html#sld-reference-labeling

Kind regards,

Roel

For completeness the text symbolizer I’m using to test:

ogc:PropertyNamesoort_water</ogc:PropertyName>

#000000

true

90

400


Volg Aquafin op Facebook | Twitter | YouTube | LinkedIN

Disclaimer: zie www.aquafin.be P Denk aan het milieu. Druk deze mail niet onnodig af.

On Fri, Jun 13, 2014 at 11:47 AM, Roel De Nijs <roel.denijs@anonymised.com>
wrote:

Hi list,

According to the documentation [1] GeoServer labels each line only once.
And if you want to repeat the label (for long lines) you should add the
repeat vender option with a positive value (the number of pixels).

That’s not what I’m experiencing. In each of the following 3 scenarios I
get the same image (with a repeated label):

1. Text symbolizer without repeat vender option

2. Text symbolizer with <VendorOption name="repeat">150</VendorOption>
(only in this scenario I would expect the label repetition)

3. Text symbolizer with <VendorOption name="repeat">-1</VendorOption>

What am I missing here? I’m using a 2.5-SNAPSHOT (will upgrade to stable
2.5.1 later today).

What often happens is that what looks like a single line visually, is
actually a set of many lines in the
data set, each one with its own attributes, very common in road networks
for example, where
the road is cut at every crossing.
For those cases you should look at the grouping options

Cheers
Andrea

--

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

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

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

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

geowolf wrote

What often happens is that what looks like a single line visually, is
actually a set of many lines in the
data set, each one with its own attributes, very common in road networks
for example, where
the road is cut at every crossing.
For those cases you should look at the grouping options

The geometry of this line looks like "LINESTRING (145457.62 181270.73,
145661.23 181199.76)". I would (maybe wrongly) assume that results in just a
single line.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/SLD-Labeling-no-repeat-tp5145695p5145703.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Fri, Jun 13, 2014 at 1:04 PM, Roel De Nijs <roel.denijs@anonymised.com>
wrote:

geowolf wrote
> What often happens is that what looks like a single line visually, is
> actually a set of many lines in the
> data set, each one with its own attributes, very common in road networks
> for example, where
> the road is cut at every crossing.
> For those cases you should look at the grouping options

The geometry of this line looks like "LINESTRING (145457.62 181270.73,
145661.23 181199.76)". I would (maybe wrongly) assume that results in just
a
single line.

It is. Maybe you're facing another issue, your client is making tiled
requests?
In that case, each tile where the line is present will get its label.
Metatiling would be a partial answer in that case

Cheers
Andrea

--

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

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

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

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

Yes, we have tiled requests. And yes, the different tiles all having the same line have each a label. But for every tile there is just 1 label.

I guess on your last sentence it’s not easy to change this behavior. But I showed it to our customers and they don’t have a problem with the repeated label. So I’m a happy camper too.

Thanks for the help!

Van: andrea.aime@…84… [mailto:andrea.aime@…84…] Namens Andrea Aime
Verzonden: vrijdag 13 juni 2014 14:02
Aan: Roel De Nijs
CC: GeoServer Mailing List List
Onderwerp: Re: [Geoserver-users] [SLD] Labeling no repeat

On Fri, Jun 13, 2014 at 1:04 PM, Roel De Nijs <roel.denijs@…5173…> wrote:

geowolf wrote

What often happens is that what looks like a single line visually, is
actually a set of many lines in the
data set, each one with its own attributes, very common in road networks
for example, where
the road is cut at every crossing.
For those cases you should look at the grouping options

The geometry of this line looks like “LINESTRING (145457.62 181270.73,
145661.23 181199.76)”. I would (maybe wrongly) assume that results in just a
single line.

It is. Maybe you’re facing another issue, your client is making tiled requests?

In that case, each tile where the line is present will get its label.

Metatiling would be a partial answer in that case

Cheers

Andrea

==

GeoServer Professional Services from the experts! Visit

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

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



Volg Aquafin op Facebook | Twitter | YouTube | LinkedIN

Disclaimer: zie www.aquafin.be P Denk aan het milieu. Druk deze mail niet onnodig af.