I'm novice in Geoserver. I use Version 2.15.1.

I would like to display labels. This is my SLD – made and export with QGIS:

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1.0" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:se="http://www.opengis.net/se">
          <se:Name>Single symbol</se:Name>
              <se:SvgParameter name="font-family">MS Shell Dlg 2</se:SvgParameter>
              <se:SvgParameter name="font-size">6</se:SvgParameter>
              <se:SvgParameter name="fill">#8b0000</se:SvgParameter>
            <se:VendorOption name="maxDisplacement">1</se:VendorOption>
            <se:VendorOption name="conflictResolution">false</se:VendorOption>

Everything looks nice in QGIS. On the Geoserver the texts are shifted and written in each other.

Am I doing something wrong or is it not possible to insert the SLD from QGis in the geoserver? In addition, I would like the text in different zoom levels are displayed in different sizes. How do I realize that?

The pictures show the text layer together with another layer. First QGIS then Geoserver:



  • please add a screenshot of the map so we can see what it looks like
    – Ian Turton
    Commented Oct 22, 2019 at 13:54
  • Thanks. I have added screenshots.
    – astridx
    Commented Oct 22, 2019 at 14:03

1 Answer 1


The first issue is you have turned conflict resolution off so that GeoServer thinks that it is fine to allow the labels to be stacked on top of each other. So I would remove <se:VendorOption name="conflictResolution">false</se:VendorOption> from the SLD file. In general it is best to allow the labelling engine control conflicts as it works hard to prevent your labels looking bad. The exception to this rule is when you are explicitly placing labels at a fixed X,Y location and controlling the horizontal and vertical alignment of each label individually.

The second issue seems to be that in your QGIS window some of your labels are smaller than others but in the SLD you only have one size of text, it is also possible that you are using a size in map units rather than pixels as GeoServer is doing. I don't believe it is possible to use map unit sizes in SLD, but it may be part of the SE Standard.

To control the size depending on zoom level you will need to look at adding MinScaleDenominator and MaxScaleDenominator as described here or by using a scale dependency.

  • Thank you @Ian Turton You gave me the right tips.
    – astridx
    Commented Oct 23, 2019 at 18:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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