When doing a GetMap POST-request with a SLD constraining a NamedLayer the passed filter is parsed but not added to the request parse result.
I test on master but I’m not sure if this has ever worked.
We have an implementation that dates back to 2.1.3 that sends these filters. I haven’t tested if it worked on that version. It is long gone. But the issue occurs on 2.4 and 2.7.
Example. Should only show Broadway in blue. Shows all roads.
<?xml version="1.0" encoding="utf-8"?>
<ows:GetMap xmlns:sld="http://www.opengis.net/sld" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:se="http://www.opengis.net/se" xmlns:ogc="http://www.opengis.net/ogc" xmlns:ows="http://www.opengis.net/ows" service="WMS" version="1.1.1" format="image/png" crs="EPSG:3011">
<sld:StyledLayerDescriptor version="1.0.0">
<sld:NamedLayer>
<sld:Name>tiger:tiger_roads</sld:Name>
<sld:LayerFeatureConstraints>
<sld:FeatureTypeConstraint>
<sld:FeatureTypeName>tiger_roads</sld:FeatureTypeName>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>NAME</ogc:PropertyName>
<ogc:Literal>Broadway</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</sld:FeatureTypeConstraint>
</sld:LayerFeatureConstraints>
<sld:NamedStyle>
<sld:Name>line</sld:Name>
</sld:NamedStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>
<sld:BoundingBox srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coord>
<gml:X>-74.02722</gml:X>
<gml:Y>40.684221</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>-73.907005</gml:X>
<gml:Y>40.878178</gml:Y>
</gml:coord>
</sld:BoundingBox>
<sld:Output>
<sld:Format>image/png</sld:Format>
<sld:Transparent>false</sld:Transparent>
<sld:Size>
<sld:Width>476</sld:Width>
<sld:Height>768</sld:Height>
</sld:Size>
</sld:Output>
<sld:Exceptions>XML</sld:Exceptions>
</ows:GetMap>
Someone nicked DJB lays it out in a comment
// DJB: TODO: this needs to do the whole thing, not just names
I’ll try to add filters to the parsing done in GetMapXmlReader.java
|