I want to label all areas in a multipolygon in Geoserver using SLD. I have a map with two or three areas, but the label is only visible on the largest one. See attached images; the first image shows the map as a whole, the second image is zoomed in on the "northernmost part".

In Qgis there is a feature called Label every part of multi-part features. Is there something similar to this in Geoserver?

I've tried :

<VendorOption name="goodnessOfFit">-1</VendorOption>
<VendorOption name="conflictResolution">false</VendorOption>

among other sld commands.

The map

Zoomed in version


To the best of my knowledge (as the current maintainer of the GeoServer labeling engine) it cannot be done, unless you pre-process the data and split the above into multiple features.

An option to do that could be added though, like a labelAllComponents vendor option.

See this guide if you are interested in making it happen: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

  • Thank you Andrea for your answer. Although not what I was hoping for. I will request a new feature for the future versions of Geoserver :) . – Peter Odd Jul 1 '16 at 7:57

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.