<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html><head><meta http-equiv="Content-Type" content="text/html;charset=us-ascii">
<style>BODY{font:10pt Tahoma, Verdana, sans-serif}</style></head><body>
Hi list,<br><br>I'm currently trying to filter features from a layer via a SLD, but using the style defined by the service. I managed to get a NamedStyle by defining a classgroup and assigning the class with the group. <br><br>When I set the style via SLD to mv2, it works perfectly, but when I add the filterpart (LayerFeatureConstraints) it fails: the default style is used and no filtering occurs.<br><br>Am I doing something wrong, of is filtering nog possible via LayerFeatureConstraints?<br><br>Mapfile:<br><br>layer<br>&nbsp; name telpunten_motorvoertuig_punt<br>&nbsp; CLASSGROUP "mv"<br>&nbsp; metadata<br>&nbsp;&nbsp;&nbsp; "wms_title" "telpunten_points"<br>&nbsp;&nbsp;&nbsp; "gml_include_items" "all"<br>&nbsp;&nbsp;&nbsp; "wfs_featureid" "id"<br>&nbsp; end<br>&nbsp; group telpunten<br>&nbsp; status off<br>&nbsp; type point<br>&nbsp; dump true<br>&nbsp; template bla&nbsp; <br>&nbsp; connectiontype postgis<br>&nbsp; connection CONNECTIONSTATEMENT<br>&nbsp; data "locatie from (select id, nummer, locatie, coalesce(soort,'Onbekend') as wb_soort, wegnummer from telpunt ) as foo using srid=28992 using unique id"<br>&nbsp; projection<br>&nbsp;&nbsp;&nbsp; "init=epsg:28992"<br>&nbsp; end<br>&nbsp; classitem wb_soort<br><br>&nbsp; class<br>&nbsp;&nbsp;&nbsp; NAME "motorvoertuig"<br>&nbsp;&nbsp;&nbsp; group "mv"<br>&nbsp;&nbsp;&nbsp; expression "MOTORVOERTUIG"<br>&nbsp;&nbsp;&nbsp; style&nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; symbol "square"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; color 0 204 204<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outlinecolor 0 0 0<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; size 8<br>&nbsp;&nbsp;&nbsp; end<br>&nbsp; end<br>&nbsp; <br>&nbsp; class<br>&nbsp;&nbsp;&nbsp; NAME "motorvoertuig2"<br>&nbsp;&nbsp;&nbsp; group "mv2"<br>&nbsp;&nbsp;&nbsp; expression "MOTORVOERTUIG"<br>&nbsp;&nbsp;&nbsp; style&nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; symbol "square"<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; color 255 0 0<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; outlinecolor 0 0 0<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; size 8<br>&nbsp;&nbsp;&nbsp; end<br>&nbsp; end<br><br><br>&nbsp; processing "CLOSE_CONNECTION=DEFER"<br>end<br><br>The SLD:<br>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br><br>&lt;sld:StyledLayerDescriptor xmlns:app="http://www.deegree.org/app" xmlns:deegreeogc="http://www.deegree.org/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:sld="http://www.opengis.net/sld" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:se="http://www.opengis.net/se" version="1.0.0"&gt;<br>&nbsp;&nbsp;&nbsp; &lt;sld:NamedLayer xmlns="http://www.opengis.net/sld"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;se:Name&gt;telpunten_motorvoertuig_punt&lt;/se:Name&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;sld:NamedStyle&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;se:Name&gt;mv&lt;/se:Name&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/sld:NamedStyle&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;sld:LayerFeatureConstraints&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;Fsld:eatureTypeConstraint&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ogc:Filter&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ogc:PropertyIsEqualTo&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ogc:PropertyName&gt;wegnummer&lt;/ogc:PropertyName&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ogc:Literal&gt;A28&lt;/ogc:Literal&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/ogc:PropertyIsEqualTo&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/ogc:Filter&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/sld:FeatureTypeConstraint&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/sld:LayerFeatureConstraints&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/sld:NamedLayer&gt;<br>&lt;/sld:StyledLayerDescriptor&gt;<br><br><br>
Thanks in advance!<br><br><br>Meine Toonen<br>B3Partners BV<br>Tel: 030 214 2083</body></html>