0

I need to style a WMS Geoserver layer using SLD.

The layer is a point layer that represents trees.

The "basic" style is a green point:

<FeatureTypeStyle>
  <Rule>
    <Name>rule1</Name>
    <Title>Red Square</Title>
    <Abstract>A 15 pixel circle with a green fill and black stroke</Abstract>
    <PointSymbolizer>
        <Graphic>
          <Mark>
            <WellKnownName>circle</WellKnownName>
            <Fill>
              <CssParameter name="fill">#008000</CssParameter>
              <CssParameter name="opacity">0.7</CssParameter>
            </Fill>
            <Stroke>
              <CssParameter name="stroke">#000000</CssParameter>
              <CssParameter name="stroke-width">1</CssParameter>
            </Stroke>
          </Mark>
          <Size>15</Size>
        </Graphic>
    </PointSymbolizer>
  </Rule>
</FeatureTypeStyle>

In addition, if the attribute 'stamdiameter' is > 0, I need to add an outer 1 pixel wide green ring, the size of which corresponds to the number of centimeters recorded in 'stamdiameter' multiplied by 15.

Ideally, I even need to respond to the attribute 'krondiameter' in a similar way.

Your Answer

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

Browse other questions tagged or ask your own question.