[Geoserver-devel] [JIRA] (GEOS-7766) Add filter parsing to GetMap POST

Olle Markljung created an issue

GeoServer / ImprovementGEOS-7766

Add filter parsing to GetMap POST

Issue Type:

ImprovementImprovement

Affects Versions:

2.10-beta

Assignee:

Unassigned

Created:

26/Sep/16 1:54 PM

Environment:

On master.

Priority:

MediumMedium

Reporter:

Olle Markljung

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

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.362.1#100014-sha1:6f27b8c)

Atlassian logo