[mapserver-users] SLD & Filter

Martin Over martinover at gmx.de
Fri Mar 24 07:16:37 PDT 2017


Hi,

I trying to apply a SLD Filter:

...
<Rule>
<Title>Kläranlagen OWB 1</Title>
<ogc:Filter>
<ogc:PropertyIsLike>
<ogc:PropertyName>g</ogc:PropertyName>
<ogc:Literal>Bonn</ogc:Literal>
</ogc:PropertyIsLike>
</ogc:Filter>
<PointSymbolizer>
<Geometry>
<PropertyName>locatedAt</PropertyName>
</Geometry>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#00FF00</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
</Stroke>
</Mark>
<Size>12.0</Size>
</Graphic>
</PointSymbolizer>
</Rule>
...
<Rule>
<Title>Kläranlagen OWB 2</Title>
<Filter>
<PropertyIsLike>
<PropertyName>g</PropertyName>
<Literal>Essen</Literal>
</PropertyIsLike>
</Filter>
<PointSymbolizer>
<Geometry>
<PropertyName>locatedAt</PropertyName>
</Geometry>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
</Stroke>
</Mark>
<Size>12.0</Size>
</Graphic>
</PointSymbolizer>
</Rule>
..


But the filter is ignored in the temporary map file (not the SLD the color of the class Kläranlagen OWB 1 is correct rendered):

 LAYER
    DATA "krankenhausdaten"
    NAME "states"
    STATUS ON
    TILEITEM "location"
    TYPE POINT
    UNITS METERS
    CLASS
      NAME "Kläranlagen OWB 1"
      STYLE
        COLOR 0 255 0
        OUTLINECOLOR 0 0 0
        SIZE 12
        SYMBOL "sld_mark_symbol_circle_filled"
      END # STYLE
      TITLE "Kläranlagen OWB 1"
    END # CLASS
    CLASS
      NAME "Kläranlagen OWB 2"
      STYLE
        COLOR 255 0 0
        OUTLINECOLOR 0 0 0
        SIZE 12
        SYMBOL "sld_mark_symbol_circle_filled"
      END # STYLE
      TITLE "Kläranlagen OWB 2"
    END # CLASS

This was working in mapserver 5 & 6 as expected.
The SLD filter examples from the 7.0.4 Doku over http://demo.mapserver.org/ are rendered with - MapServer version 5.6.5.

Could anybody help me?

Best,

Martin 



More information about the MapServer-users mailing list