[Geoserver-users] Label ordering across layer groups

Hi List,
I’m getting labels like this and don’t know why:
Inline images 1

This is from a layer group, the two layers in question are ordered thus in the layergroup:

[other layers]
Road Lines layer (“Greenmoor Road”)
Text Points Layer (“Nuneaton”)

So the Text layer should be on top of Road layer.
The Text layer is rendered correctly on top of the Road Line features. However as you can see the road label (which is in the same table and SLD as the road lines) are ending up on top.

The road layer and the text points layer are coming from different Oracle tables and both are rendered with different SLD’s.

Can anyone advise what’s going on?

Thanks,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

On Tue, Dec 17, 2013 at 3:54 PM, Jonathan Moules <
jonathanmoules@anonymised.com> wrote:

Hi List,
I'm getting labels like this and don't know why:
!image.png|182x126

This is from a layer group, the two layers in question are ordered thus in
the layergroup:

[other layers]

Road Lines layer ("Greenmoor Road")
Text Points Layer ("Nuneaton")

So the Text layer should be on top of Road layer.
The Text layer is rendered correctly on top of the Road Line features.
However as you can see the road label (which is in the same table and SLD
as the road lines) are ending up on top.

Weird weird... are you really sure that's a single GetMap request?

Also:
* did you disable conflict resolution for some labels?
* do you have priorities specified for the labels?

Cheers
Andrea

--
*== GeoSolutions will be closed for seasonal holidays from 23/12/2013 to
06/01/2014 ==*

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 Andrea,
Yep, definitely a single request returns a single tile:
http://wppgeog3:9030/geoserver/ows?LAYERS=z_OS_Vector_Basemap_Neutral&FORMAT=image%2Fpng&ISBASELAYER=true&ATTRIBUTION=Crown%20Copyright%20and%20database%20right%202013.%20Ordnance%20Survey%20100019520&OPACITY=1&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A27700&BBOX=435097.6,291020.8,435814.4,291737.6&WIDTH=256&HEIGHT=256

  • I don’t know anything about label priorities, so I guess that’s on the default.

  • Yep, the “Nuneaton” text layer has conflict resolution removed:
    <se:VendorOption name=“conflictResolution”>false</se:VendorOption>

I suspect I know where this is going - if I enable conflictResolution on the text layer the road label disappears. So the conflict resolution stuff is done after the other rendering, and I have to enable it if I don’t want my labels wrongly overlapped? (I’d be fine if the road label was overlapped).

Cheers,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

image.png

···

On 17 December 2013 15:04, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Tue, Dec 17, 2013 at 3:54 PM, Jonathan Moules <jonathanmoules@…4942…> wrote:

Hi List,
I’m getting labels like this and don’t know why:
Inline images 1

This is from a layer group, the two layers in question are ordered thus in the layergroup:

[other layers]
Road Lines layer (“Greenmoor Road”)
Text Points Layer (“Nuneaton”)

So the Text layer should be on top of Road layer.
The Text layer is rendered correctly on top of the Road Line features. However as you can see the road label (which is in the same table and SLD as the road lines) are ending up on top.

Weird weird… are you really sure that’s a single GetMap request?

Also:

  • did you disable conflict resolution for some labels?
  • do you have priorities specified for the labels?

Cheers
Andrea

== GeoSolutions will be closed for seasonal holidays from 23/12/2013 to 06/01/2014 ==

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 Tue, Dec 17, 2013 at 4:14 PM, Jonathan Moules <
jonathanmoules@anonymised.com> wrote:

Hi Andrea,
Yep, definitely a single request returns a single tile:

http://wppgeog3:9030/geoserver/ows?LAYERS=z_OS_Vector_Basemap_Neutral&FORMAT=image%2Fpng&ISBASELAYER=true&ATTRIBUTION=Crown%20Copyright%20and%20database%20right%202013.%20Ordnance%20Survey%20100019520&OPACITY=1&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A27700&BBOX=435097.6,291020.8,435814.4,291737.6&WIDTH=256&HEIGHT=256

- I don't know anything about label priorities, so I guess that's on the
default.
- Yep, the "Nuneaton" text layer has conflict resolution removed:
            <se:VendorOption name="conflictResolution">false</
se:VendorOption>

I suspect I know where this is going - if I enable conflictResolution on
the text layer the road label disappears. So the conflict resolution stuff
is done after the other rendering, and I have to enable it if I don't want
my labels wrongly overlapped? (I'd be fine if the road label was
overlapped).

Hmm... ok, half of mistery solved, but I still don't know why the label
without conflict resolution is painted later.
When you say Text Points Layer ("Nuneaton") is the last one, does it mean
it's the one at the bottom
of the list in the GUI, or first?
I know it may be counter-intuitive, but WMS paints the first layer of the
list first, moves to the next,
and so on (the so called "painter's model")

Cheers
Andrea

--
*== GeoSolutions will be closed for seasonal holidays from 23/12/2013 to
06/01/2014 ==*

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 Andrea,

When you say Text Points Layer (“Nuneaton”) is the last one, does it mean it’s the one at the bottom
of the list in the GUI, or first?

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

image.png

···

It’s at the bottom of the layer list. I made that mistake many months ago and have since learn from it. :wink:

Inline images 1

So OS_VML_Text should always be on top, but because conflictResolution is disabled on it, it’s not. I’m guessing from your reaction this is a bug? Should I JIRA it?

Thanks,
Jonathan

On 17 December 2013 15:18, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Tue, Dec 17, 2013 at 4:14 PM, Jonathan Moules <jonathanmoules@anonymised.com> wrote:

Hi Andrea,
Yep, definitely a single request returns a single tile:
http://wppgeog3:9030/geoserver/ows?LAYERS=z_OS_Vector_Basemap_Neutral&FORMAT=image%2Fpng&ISBASELAYER=true&ATTRIBUTION=Crown%20Copyright%20and%20database%20right%202013.%20Ordnance%20Survey%20100019520&OPACITY=1&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A27700&BBOX=435097.6,291020.8,435814.4,291737.6&WIDTH=256&HEIGHT=256

  • I don’t know anything about label priorities, so I guess that’s on the default.

  • Yep, the “Nuneaton” text layer has conflict resolution removed:
    <se:VendorOption name=“conflictResolution”>false</se:VendorOption>

I suspect I know where this is going - if I enable conflictResolution on the text layer the road label disappears. So the conflict resolution stuff is done after the other rendering, and I have to enable it if I don’t want my labels wrongly overlapped? (I’d be fine if the road label was overlapped).

Hmm… ok, half of mistery solved, but I still don’t know why the label without conflict resolution is painted later.
When you say Text Points Layer (“Nuneaton”) is the last one, does it mean it’s the one at the bottom
of the list in the GUI, or first?
I know it may be counter-intuitive, but WMS paints the first layer of the list first, moves to the next,
and so on (the so called “painter’s model”)

Cheers

Andrea

== GeoSolutions will be closed for seasonal holidays from 23/12/2013 to 06/01/2014 ==

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