SLD Filters

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Tue Sep 14 12:08:06 EDT 2004


Hi There,

  I have made a couple of tests using the tests data here (url is at
http://www2.dmsolutions.ca/cgi-bin/mswms_world?SERVICE=WMS&VeRsIoN=1.1.1&Request=GetMap&LAYERS=WorldGen&SLD=http://www2.dmsolutions.ca/msapps/world_testdata/tests/sld_tests/sld_polygon_one_filter_and_else2.xml)

  The sld has a same kind of structure as yours (polygon symbolizer with
one filter and one else filer) and seems to apply the filters properly.
If you can provide me with sample data and sld that does not work, I can
check it more specifically.

Later,

Nicol Hermann wrote:

> 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
>
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-users mailing list