I'm experiencing that followline is not showing all of the labels that I
have on the dataset. I have a line-layer(roads) with roadnames. If I write
the SLD with a followline constraint the number of labels a clearly reduced.
I've tried to resolve it by reducing the font-size and changing font, but
the labels are still not appearing on all roads. Here is a piece of the
SLD-code:
I’m experiencing that followline is not showing all of the labels that I
have on the dataset. I have a line-layer(roads) with roadnames. If I write
the SLD with a followline constraint the number of labels a clearly reduced.
I’ve tried to resolve it by reducing the font-size and changing font, but
the labels are still not appearing on all roads. Here is a piece of the
SLD-code:
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
the portion before and after the middle point is long enough to fit the whole label
That’s the one that get’s me. My lines are text points that have been converted to lines in the loading process (GIS’s handle them better) - unfortunately when this parameter is enabled GeoServer refuses to render text if it is longer than the line (common with larger text sizes or when zoomed out).
However, even with followLine=false, the text still follows the line and doesn’t disappear. But again, my use-case is lines that are designed for text. Not sure if that’ll do it for you.
I’m experiencing that followline is not showing all of the labels that I
have on the dataset. I have a line-layer(roads) with roadnames. If I write
the SLD with a followline constraint the number of labels a clearly reduced.
I’ve tried to resolve it by reducing the font-size and changing font, but
the labels are still not appearing on all roads. Here is a piece of the
SLD-code:
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out. http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
On Mon, Aug 5, 2013 at 12:09 PM, Jonathan Moules <
jonathanmoules@anonymised.com> wrote:
However, even with followLine=false, the text still follows the line and
doesn't disappear. But again, my use-case is lines that are designed for
text. Not sure if that'll do it for you.
The default behavior with a LinePlacement is to put the text tangent to the
line, at this point we don't need the line anymore, we already have the
direction.
With followLine we actually follow the line shape, curving along it, so we
need a line to follow, if it's not long enough, we cannot place the label.
As an improvement, we could simply expand the line along the tangent to its
begin and end segments, but we don't have the code to do that right now.
Not even sure it's desirable, if a line is too short to contain its name,
better leave it not labelled imho, otherwise we might end up having
super-small
lines being drawn and their label sucking a lot of space and preventing
longer lines to be labelled (the moment we go out of the line the chance of
collisions increases a lot)
Hi Andrea,
Thanks for the clarification. In that case the followLine=false would be optimal for our use-case scenario (and in practice it seems to be too).
I updated the docs with this straight-line behaviour as a note.
Cheers,
Jonathan
···
However, even with followLine=false, the text still follows the line and doesn’t disappear. But again, my use-case is lines that are designed for text. Not sure if that’ll do it for you.
The default behavior with a LinePlacement is to put the text tangent to the line, at this point we don’t need the line anymore, we already have the direction.
With followLine we actually follow the line shape, curving along it, so we need a line to follow, if it’s not long enough, we cannot place the label.
As an improvement, we could simply expand the line along the tangent to its begin and end segments, but we don’t have the code to do that right now.
Not even sure it’s desirable, if a line is too short to contain its name, better leave it not labelled imho, otherwise we might end up having super-small
lines being drawn and their label sucking a lot of space and preventing longer lines to be labelled (the moment we go out of the line the chance of
collisions increases a lot)