0

I exported SLD file from QGIS for a polygon layer and uploaded both the style and the layer on GeoServer. The layer in question below:

enter image description here

For some reason the label appears three times at the shown scale and as I zoom in it starts multiplying. And the Min/MaxScaleDenominator doesn't work on the label either.

Here is the code:

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" version="1.1.0" xmlns:se="http://www.opengis.net/se">
  <NamedLayer>
    <se:Name>project_hoorkommun_visu</se:Name>
    <UserStyle>
      <se:Name>project_hoorkommun_visu</se:Name>
      <se:FeatureTypeStyle>
        <se:Rule>
      &lt;se:PolygonSymbolizer&gt;
        &lt;se:Fill&gt;
          &lt;se:SvgParameter name=&quot;fill&quot;&gt;#e3e987&lt;/se:SvgParameter&gt;
        &lt;/se:Fill&gt;
        &lt;se:Stroke&gt;
          &lt;se:SvgParameter name=&quot;stroke&quot;&gt;#388036&lt;/se:SvgParameter&gt;
          &lt;se:SvgParameter name=&quot;stroke-width&quot;&gt;1&lt;/se:SvgParameter&gt;
          &lt;se:SvgParameter name=&quot;stroke-linejoin&quot;&gt;bevel&lt;/se:SvgParameter&gt;
        &lt;/se:Stroke&gt;
      &lt;/se:PolygonSymbolizer&gt;
    &lt;/se:Rule&gt;
    &lt;se:Rule&gt;

      &lt;se:TextSymbolizer&gt;
        &lt;se:Label&gt;
          &lt;ogc:PropertyName&gt;kommunnamn&lt;/ogc:PropertyName&gt;
        &lt;/se:Label&gt;
        &lt;se:Font&gt;
          &lt;se:SvgParameter name=&quot;font-family&quot;&gt;Georgia&lt;/se:SvgParameter&gt;
          &lt;se:SvgParameter name=&quot;font-size&quot;&gt;18&lt;/se:SvgParameter&gt;
          &lt;se:SvgParameter name=&quot;font-weight&quot;&gt;bold&lt;/se:SvgParameter&gt;
        &lt;/se:Font&gt;
        &lt;se:LabelPlacement&gt;
          &lt;se:PointPlacement&gt;
            &lt;se:AnchorPoint&gt;
              &lt;se:AnchorPointX&gt;0.5&lt;/se:AnchorPointX&gt;
              &lt;se:AnchorPointY&gt;0.5&lt;/se:AnchorPointY&gt;
            &lt;/se:AnchorPoint&gt;
          &lt;/se:PointPlacement&gt;
        &lt;/se:LabelPlacement&gt;
        &lt;se:Fill&gt;
          &lt;se:SvgParameter name=&quot;fill&quot;&gt;#323232&lt;/se:SvgParameter&gt;
        &lt;/se:Fill&gt;
      &lt;/se:TextSymbolizer&gt;
    &lt;/se:Rule&gt;
  &lt;/se:FeatureTypeStyle&gt;
&lt;/UserStyle&gt;

</NamedLayer> </StyledLayerDescriptor>

Vince
  • 20,017
  • 15
  • 45
  • 64

0 Answers0