Hi List,
I’m trying to use the “Priority” enhanced labelling option - http://docs.geoserver.org/latest/en/user/styling/sld-reference/labeling.html#priority-labeling
However, no matter where I place it, GeoServer fails the SLD validation (Andrea’s post to - http://osgeo-org.1560.x6.nabble.com/SLD-validation-fails-on-GS-2-1-1-td3791003.html suggests it should be just about Vendor Options).
This might just be because I’m using SLD 1.1
line 96: cvc-complex-type.2.4.a: Invalid content was found starting with element ‘se:Priority’. One of ‘{“http://www.opengis.net/se”:VendorOption}’ is expected.
However, when I view the WMS output, it returns a map that doesn’t appear to have taken the Priority into account; the feature with a priority of 10,000 is unlabelled but the surrounding 2,000 priorities are labelled just fine.
<ogc:Function name=“strToUpperCase”>
ogc:PropertyNameNAME</ogc:PropertyName>
</ogc:Function>
</se:Label>se:Font
<se:SvgParameter name=“font-family”>Tahoma</se:SvgParameter>
<se:SvgParameter name=“font-size”>12</se:SvgParameter>
<se:SvgParameter name=“font-style”>normal</se:SvgParameter>
<se:SvgParameter name=“font-weight”>bold</se:SvgParameter>
</se:Font>se:LabelPlacement
se:PointPlacement
se:AnchorPoint
se:AnchorPointX
<ogc:Function name=“if_then_else”>
<ogc:Function name=“in3”>
ogc:PropertyNameLOCATION</ogc:PropertyName>
ogc:Literal0</ogc:Literal>
ogc:Literal1</ogc:Literal>
ogc:Literal2</ogc:Literal>
</ogc:Function>
ogc:Literal0</ogc:Literal>
<ogc:Function name=“if_then_else”>
<ogc:Function name=“in3”>
ogc:PropertyNameLOCATION</ogc:PropertyName>
ogc:Literal3</ogc:Literal>
ogc:Literal4</ogc:Literal>
ogc:Literal5</ogc:Literal>
</ogc:Function>
ogc:Literal0.5</ogc:Literal>
ogc:Literal1</ogc:Literal>
</ogc:Function>
</ogc:Function>
</se:AnchorPointX>se:AnchorPointY
<ogc:Function name=“if_then_else”>
<ogc:Function name=“in3”>
ogc:PropertyNameLOCATION</ogc:PropertyName>
ogc:Literal0</ogc:Literal>
ogc:Literal3</ogc:Literal>
ogc:Literal6</ogc:Literal>
</ogc:Function>
ogc:Literal0</ogc:Literal>
<ogc:Function name=“if_then_else”>
<ogc:Function name=“in3”>
ogc:PropertyNameLOCATION</ogc:PropertyName>
ogc:Literal1</ogc:Literal>
ogc:Literal4</ogc:Literal>
ogc:Literal7</ogc:Literal>
</ogc:Function>
ogc:Literal0.5</ogc:Literal>
ogc:Literal1</ogc:Literal>
</ogc:Function>
</ogc:Function>
</se:AnchorPointY>
</se:AnchorPoint>
</se:PointPlacement>
</se:LabelPlacement>
se:Halo
se:Radius2</se:Radius>
se:Fill<se:SvgParameter name=“fill”>#ffffff</se:SvgParameter></se:Fill>
</se:Halo>
se:Fill
<se:SvgParameter name=“fill”>#999999</se:SvgParameter>
</se:Fill>se:Priority10000</se:Priority>
<se:VendorOption name=“spaceAround”>50</se:VendorOption>
<se:VendorOption name=“maxDisplacement”>50</se:VendorOption>
</se:TextSymbolizer>
Is there a good way to confirm that the priority function is working? Am I right in thinking the way it works is that the label should be shown in preference for other features when doing conflict resolution?
If I turn off the 2000 priority level features entirely, the 10,000 label shows fine, so GeoServer has no problem placing it.
Cheers,
Jonathan
This transmission is intended for the named addressee(s) only and may contain confidential, sensitive or personal information 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.