SLD Filters

Nicol Hermann mapserver at GEOWORLD.DE
Tue Sep 14 09:08:47 EDT 2004


Hi List,

i am fighting with the SLD filter support of mapserver (4.2.3)
I have the following sld-file which should highlight all records where
ID  >= 33905. All remaining record should be displayed in red.

<StyledLayerDescriptor version='1.0.0'>
   <NamedLayer>
      <Name>gemeinde</Name>
      <UserStyle>
         <Title>xxx</Title>
            <FeatureTypeStyle>
                 <Rule>
                    <Filter>
                       <PropertyIsGreaterThanOrEqualTo>
                          <PropertyName>ID</PropertyName>
                          <Literal>33905</Literal>
                       </PropertyIsGreaterThanOrEqualTo>
                    </Filter>
                    <PolygonSymbolizer>
                    <Fill>
                       <CssParameter name='fill'>#FFFF00</CssParameter>
                    </Fill>
                 </PolygonSymbolizer>
                 </Rule>
                 <Rule>
                    <ElseFilter/>
                    <PolygonSymbolizer>
                    <Fill>
                       <CssParameter name='fill'>#FF0000</CssParameter>
                    </Fill>
                    </PolygonSymbolizer>
                 </Rule>
           </FeatureTypeStyle>
        </UserStyle>
   </NamedLayer>
</StyledLayerDescriptor>

What i got is the attached file 'ms_sld.png'. When i did the same query
(ID  >= 33905) with ArcExplorer ('ae_sld.png') i got reasonable results
while the mapserver results are wrong.

When i use the unique field ID with ID=33905 (PropertyIsEqualTo) i got
the whole map highlighted not only one polygon.

What i am doing wrong?
Any help on this would be greatly appreciated
Nicol

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ae_sld.png
Type: image/png
Size: 18746 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20040914/a598f167/ae_sld.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ms_sld.png
Type: image/png
Size: 5477 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapserver-users/attachments/20040914/a598f167/ms_sld.png


More information about the mapserver-users mailing list