[Geoserver-users] SLD Point Labelling

Hello all,

This is rather a simple and dumb question :slight_smile: I’ve been playing a lot with SLD but one thing i haven’t been able to solve yet is the correct display of labels (in points) in a tiled WMS request. I think this is related with the tile - if the label crosses the margin of the tile then it is not displayed. So, in my case, some points are showing labels and some others are not. Is there any way to force label drawing? Something that would place the label in the opposite side if label is crossing the tile margin?

Thanks in advance.
Cheers,


Hugo Martins

Hugo,

Instead of a Tiled WMS, can you use a cached layer (e.g. TMS or WMTS) instead? A typical tiling engine such as GeoWebCache allow you to create a larger meta-tile that is cut into 256*256 pixel tiles afterwards. This reduces the number of labels not being placed. They’re still cut off at the tile edge, but continue on the neighbouring tile!

HTH,

Edward


Date: Fri, 27 Sep 2013 11:28:38 +0100
From: hfpmartins@anonymised.com
To: geoserver-users@anonymised.comsts.sourceforge.net
Subject: [Geoserver-users] SLD Point Labelling

Hello all,

This is rather a simple and dumb question :slight_smile: I’ve been playing a lot with SLD but one thing i haven’t been able to solve yet is the correct display of labels (in points) in a tiled WMS request. I think this is related with the tile - if the label crosses the margin of the tile then it is not displayed. So, in my case, some points are showing labels and some others are not. Is there any way to force label drawing? Something that would place the label in the opposite side if label is crossing the tile margin?

Thanks in advance.
Cheers,


Hugo Martins

------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Fri, Sep 27, 2013 at 12:28 PM, Hugo <hfpmartins@anonymised.com> wrote:

Hello all,

This is rather a simple and dumb question :slight_smile: I've been playing a lot with
SLD but one thing i haven't been able to solve yet is the correct display
of labels (in points) in a tiled WMS request. I think this is related with
the tile - if the label crosses the margin of the tile then it is not
displayed. So, in my case, some points are showing labels and some others
are not. Is there any way to force label drawing? Something that would
place the label in the opposite side if label is crossing the tile margin?

No, it's not possible, because there is no guarantee the other part of the
label will actually be drawn
in the nearby tile due to conflict resolution. Search the archives and the
internet, the topic has
been discussed to the death

A partial solution is to use a tile cache (the integrated GWC for example
:wink: ) and pump up the
metatiling factor to a large value, e.g. 10

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it 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

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

Hi guys,

Thanks for your answers. I know that this was discussed several times but i just wanted to be sure that this is still the case. In my current case i can’t use cache so i’ll live with the missing labels :slight_smile:

Cheers,

···

On Fri, Sep 27, 2013 at 11:35 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Fri, Sep 27, 2013 at 12:28 PM, Hugo <hfpmartins@anonymised.com> wrote:


Hugo Martins

Hello all,

This is rather a simple and dumb question :slight_smile: I’ve been playing a lot with SLD but one thing i haven’t been able to solve yet is the correct display of labels (in points) in a tiled WMS request. I think this is related with the tile - if the label crosses the margin of the tile then it is not displayed. So, in my case, some points are showing labels and some others are not. Is there any way to force label drawing? Something that would place the label in the opposite side if label is crossing the tile margin?

No, it’s not possible, because there is no guarantee the other part of the label will actually be drawn
in the nearby tile due to conflict resolution. Search the archives and the internet, the topic has
been discussed to the death

A partial solution is to use a tile cache (the integrated GWC for example :wink: ) and pump up the
metatiling factor to a large value, e.g. 10

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it 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


On Fri, Sep 27, 2013 at 12:37 PM, Hugo <hfpmartins@anonymised.com> wrote:

Hi guys,

Thanks for your answers. I know that this was discussed several times but
i just wanted to be sure that this is still the case. In my current case i
can't use cache so i'll live with the missing labels :slight_smile:

Unless our understanding of the problem is wrong, it will always be the
case, the answer won't change over time, it's in the very nature of mixing
tiling and conflict resolution.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it 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

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