I’ve read that it’s possible to create an SLD that filters a range of values using the syntax below. I’m having trouble implementing this on a polygon data set with a field named AGEHHH that contains a range of values from 36.12345… - 56.1234… When I use the syntax indicated below, I get a “ServiceException” that says the style can’t be used with this layer.
- Do I need to make sure that my SLD can deal with ALL values between 36.0 and 56.0, or can I write a filter that only displays a single value of the data set?
- Is the data type (floating point) a problem?
- Should I only apply the style rule to the fill, and have a generic stroke section?
Any clues someone can provide will be worth beer at the next conference.
<ogc:Filter xmlns:ogc=“http://www.opengis.net/ogc” xmlns:gml=“http://www.opengis.net/gml”>
ogc:PropertyIsLessThan
ogc:PropertyNameAGEHHH</ogc:PropertyName>
ogc:Literal38</ogc:Literal>
</ogc:PropertyIsLessThan>
ogc:PropertyIsGreaterThan
ogc:PropertyNameAGEHHH</ogc:PropertyName>
ogc:Literal36</ogc:Literal>
</ogc:PropertyIsGreaterThan>
</ogc:And>
</ogc:Filter>
####### Using "PropertyIsBetween ########
<ogc:Filter>
<ogc:PropertyIsBetween>
<ogc:PropertyName>AGEHHH</ogc:PropertyName>
<ogc:LowerBoundary><ogc:Literal>36.0</ogc:Literal></ogc:LowerBoundary>
<ogc:UpperBoundary><ogc:Literal>38.0</ogc:Literal></ogc:UpperBoundary>
</ogc:PropertyIsBetween>
</ogc:Filter>
–
Roger André
GIS Developer/Analyst
Enterprise Management Solutions
CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com
Developing People through Challenging Projects