1

I have a point layer that I serve as WMS with GeoServer. The points have language and name properties and some points have the same geometry so they overlap. What I want to do is to prioritize rendering of labels for certain language using SLD stylesheet.

Example: There are two points with same geometry, one has language value 5, the other has language value 7. I want only the name of point with language value 7 to be rendered.

2

You can use the Priority option in your TextSymbolizer to favour one label over the others. The higher the value the more likely a label is to be used.

<Priority>
  <ogc:PropertyName>population</ogc:PropertyName>
</Priority>
  • From what I get, this will make a label with higher population value (in your case) a priority. But what if the value that I want to prioritize is not the highest one? – Marin Leontenko Mar 13 at 9:21
  • 1
    you can use some maths or an if_then function to make it the largest – Ian Turton Mar 13 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.