<!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>
Thanks voor the info Tom. I made the ticket: http://trac.osgeo.org/mapserver/ticket/4025, I was not sure in which component this applies to, so left it at the "MapServer C Library"
.<br><br>Met vriendelijke groet,<br><br>Meine Toonen<br>B3Partners BV<br>Tel: 030 214 2083<br><blockquote style="padding-left: 5px; margin-left: 5px; border-left: #0000ff 2px solid; margin-right: 0px"><hr><b>From:</b> Kralidis,Tom [Ontario] [mailto:Tom.Kralidis@ec.gc.ca]<br><b>To:</b> Meine Toonen [mailto:meinetoonen@b3partners.nl], mapserver-users@lists.osgeo.org<br><b>Sent:</b> Tue, 13 Sep 2011 13:36:31 +0200<br><b>Subject:</b> RE: [mapserver-users] SLD with LayerFeatureConstraints<br><br>At thispoint, filtering is only supported via UserStyle. Having said<br>
this, please submit a trac ticket for the requirement. Not sure when/if<br>
it would be addressed.<br>
<br>
..Tom<br>
<br>
<br>
> -----Original Message-----<br>
> From: Meine Toonen [mailto:<a href="mailto:meinetoonen@b3partners.nl">meinetoonen@b3partners.nl</a>]<br>
> Sent: Tuesday, 13 September 2011 05:56<br>
> To: Kralidis,Tom [Ontario]; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> Subject: RE: [mapserver-users] SLD with LayerFeatureConstraints<br>
> <br>
> Thanks for the info.<br>
> Will the LayerFeatureConstraints options be available in the future,<br>
or is<br>
> filtering only supported in an UserStyle? Couldn't find it in the<br>
trac.<br>
> <br>
> Met vriendelijke groet,<br>
> <br>
> Meine Toonen<br>
> B3Partners BV<br>
> Tel: 030 214 2083<br>
> <br>
> <br>
> ________________________________<br>
> <br>
> From: Kralidis,Tom [Ontario] [mailto:<a href="mailto:Tom.Kralidis@ec.gc.ca">Tom.Kralidis@ec.gc.ca</a>]<br>
> To: Meine Toonen [mailto:<a href="mailto:meinetoonen@b3partners.nl">meinetoonen@b3partners.nl</a>], mapserver-<br>
> <a href="mailto:users@lists.osgeo.org">users@lists.osgeo.org</a><br>
> Sent: Mon, 12 Sep 2011 16:56:33 +0200<br>
> Subject: RE: [mapserver-users] SLD with LayerFeatureConstraints<br>
> <br>
> <br>
> <br>
> > -----Original Message-----<br>
> > From: <a href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a><br>
[mailto:mapserver-<br>
> users-<br>
> > <a href="mailto:bounces@lists.osgeo.org">bounces@lists.osgeo.org</a>] On Behalf Of Meine Toonen<br>
> > Sent: Monday, 12 September 2011 10:22<br>
> > To: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> > Subject: [mapserver-users] SLD with LayerFeatureConstraints<br>
> ><br>
> > Hi list,<br>
> ><br>
> > I'm currently trying to filter features from a layer via a<br>
SLD, but<br>
> using<br>
> > the style defined by the service. I managed to get a<br>
NamedStyle by<br>
> defining<br>
> > a classgroup and assigning the class with the group.<br>
> ><br>
> > When I set the style via SLD to mv2, it works perfectly, but<br>
when I<br>
> add the<br>
> > filterpart (LayerFeatureConstraints) it fails: the default<br>
style is<br>
> used<br>
> > and no filtering occurs.<br>
> ><br>
> > Am I doing something wrong, of is filtering nog possible via<br>
> > LayerFeatureConstraints?<br>
> ><br>
> > Mapfile:<br>
> ><br>
> > layer<br>
> > name telpunten_motorvoertuig_punt<br>
> > CLASSGROUP "mv"<br>
> > metadata<br>
> > "wms_title" "telpunten_points"<br>
> > "gml_include_items" "all"<br>
> > "wfs_featureid" "id"<br>
> > end<br>
> > group telpunten<br>
> > status off<br>
> > type point<br>
> > dump true<br>
> > template bla<br>
> > connectiontype postgis<br>
> > connection CONNECTIONSTATEMENT<br>
> > data "locatie from (select id, nummer, locatie,<br>
> > coalesce(soort,'Onbekend') as wb_soort, wegnummer from telpunt<br>
) as<br>
> foo<br>
> > using srid=28992 using unique id"<br>
> > projection<br>
> > "init=epsg:28992"<br>
> > end<br>
> > classitem wb_soort<br>
> ><br>
> > class<br>
> > NAME "motorvoertuig"<br>
> > group "mv"<br>
> > expression "MOTORVOERTUIG"<br>
> > style<br>
> ><br>
> > symbol "square"<br>
> > color 0 204 204<br>
> > outlinecolor 0 0 0<br>
> > size 8<br>
> > end<br>
> > end<br>
> ><br>
> > class<br>
> > NAME "motorvoertuig2"<br>
> > group "mv2"<br>
> > expression "MOTORVOERTUIG"<br>
> > style<br>
> ><br>
> > symbol "square"<br>
> > color 255 0 0<br>
> > outlinecolor 0 0 0<br>
> > size 8<br>
> > end<br>
> > end<br>
> ><br>
> ><br>
> > processing "CLOSE_CONNECTION=DEFER"<br>
> > end<br>
> ><br>
> > The SLD:<br>
> > <?xml version="1.0" encoding="UTF-8"?><br>
> ><br>
> > <sld:StyledLayerDescriptor<br>
xmlns:app="<a href="http://www.deegree.org/app%22" target="_blank">http://www.deegree.org/app"</a><br>
> <<a href="http://www.deegree.org/app%22" target="_blank">http://www.deegree.org/app%22</a>><br>
> > xmlns:deegreeogc="<a href="http://www.deegree.org/ogc%22" target="_blank">http://www.deegree.org/ogc"</a><br>
> <<a href="http://www.deegree.org/ogc%22" target="_blank">http://www.deegree.org/ogc%22</a>><br>
> > xmlns:gml="<a href="http://www.opengis.net/gml%22" target="_blank">http://www.opengis.net/gml"</a><br>
> <<a href="http://www.opengis.net/gml%22" target="_blank">http://www.opengis.net/gml%22</a>><br>
> > xmlns:ogc="<a href="http://www.opengis.net/ogc%22" target="_blank">http://www.opengis.net/ogc"</a><br>
> <<a href="http://www.opengis.net/ogc%22" target="_blank">http://www.opengis.net/ogc%22</a>><br>
> > xmlns:sld="<a href="http://www.opengis.net/sld%22" target="_blank">http://www.opengis.net/sld"</a><br>
> <<a href="http://www.opengis.net/sld%22" target="_blank">http://www.opengis.net/sld%22</a>><br>
> > xmlns:xlink="<a href="http://www.w3.org/1999/xlink%22" target="_blank">http://www.w3.org/1999/xlink"</a><br>
> <<a href="http://www.w3.org/1999/xlink%22" target="_blank">http://www.w3.org/1999/xlink%22</a>><br>
> > xmlns:se="<a href="http://www.opengis.net/se%22" target="_blank">http://www.opengis.net/se"</a><br>
<<a href="http://www.opengis.net/se%22" target="_blank">http://www.opengis.net/se%22</a>><br>
> version="1.0.0"><br>
> > <sld:NamedLayer xmlns="<a href="http://www.opengis.net/sld%22" target="_blank">http://www.opengis.net/sld"</a><br>
> <<a href="http://www.opengis.net/sld%22" target="_blank">http://www.opengis.net/sld%22</a>> ><br>
> > <se:Name>telpunten_motorvoertuig_punt</se:Name><br>
> > <sld:NamedStyle><br>
> > <se:Name>mv</se:Name><br>
> > </sld:NamedStyle><br>
> > <sld:LayerFeatureConstraints><br>
> > <Fsld:eatureTypeConstraint><br>
> > <ogc:Filter><br>
> > <ogc:PropertyIsEqualTo><br>
> > <ogc:PropertyName>wegnummer</ogc:PropertyName><br>
> > <ogc:Literal>A28</ogc:Literal><br>
> > </ogc:PropertyIsEqualTo><br>
> > </ogc:Filter><br>
> > </sld:FeatureTypeConstraint><br>
> > </sld:LayerFeatureConstraints><br>
> > </sld:NamedLayer><br>
> > </sld:StyledLayerDescriptor><br>
> ><br>
> ><br>
> > Thanks in advance!<br>
> ><br>
> <br>
> Sld:LayerFeatureConstraints is not supported by MapServer, or<br>
SLD<br>
> 1.0.0.<br>
> FYI here's an example of applying filters to SLD:<br>
> <br>
> <StyledLayerDescriptor version="1.0.0"<br>
> xmlns="<a href="http://www.opengis.net/sld%22" target="_blank">http://www.opengis.net/sld"</a><br>
<<a href="http://www.opengis.net/sld%22" target="_blank">http://www.opengis.net/sld%22</a>><br>
> xmlns:ogc="<a href="http://www.opengis.net/ogc%22" target="_blank">http://www.opengis.net/ogc"</a><br>
> <<a href="http://www.opengis.net/ogc%22" target="_blank">http://www.opengis.net/ogc%22</a>><br>
> xmlns:xlink="<a href="http://www.w3.org/1999/xlink%22" target="_blank">http://www.w3.org/1999/xlink"</a><br>
> <<a href="http://www.w3.org/1999/xlink%22" target="_blank">http://www.w3.org/1999/xlink%22</a>><br>
> <br>
> xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance%22" target="_blank">http://www.w3.org/2001/XMLSchema-instance"</a><br>
> <<a href="http://www.w3.org/2001/XMLSchema-instance%22" target="_blank">http://www.w3.org/2001/XMLSchema-instance%22</a>><br>
> xsi:schemaLocation="<a href="http://www.opengis.net/sld" target="_blank">http://www.opengis.net/sld</a><br>
> <a href="http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd%22" target="_blank">http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"</a><br>
> <<a href="http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd%22" target="_blank">http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd%22</a>> ><br>
> <Name>ms_ogc_workshop</Name><br>
> <Title>SLD for MapServer OGC Web Services Workshop</Title><br>
> <Abstract>This is an SLD to show how one can make a custom style<br>
> without having to change the data style at the<br>
server-side</Abstract><br>
> <NamedLayer><br>
> <Name>rivers</Name><br>
> <UserStyle><br>
> <Name>sld_01</Name><br>
> <Title>sld_01</Title><br>
> <IsDefault>1</IsDefault><br>
> <FeatureTypeStyle><br>
> <Rule><br>
> <ogc:Filter><br>
> <ogc:PropertyIsEqualTo><br>
> <br>
> <ogc:PropertyName>NAME</ogc:PropertyName><br>
> <br>
> <ogc:Literal>Japura</ogc:Literal><br>
> </ogc:PropertyIsEqualTo><br>
> </ogc:Filter><br>
> <LineSymbolizer><br>
> <Stroke><br>
> <CssParameter<br>
> name="stroke">#FFCC00</CssParameter><br>
> <CssParameter<br>
> name="stroke-width">5</CssParameter><br>
> </Stroke><br>
> </LineSymbolizer><br>
> </Rule><br>
> </FeatureTypeStyle><br>
> </UserStyle><br>
> </NamedLayer><br>
> </StyledLayerDescriptor><br>
> <br>
<br>
</blockquote><style>
</style>
</body></html>