I am seeing an odd behavior in GeoServer V2.2.2 with Style processing. I have a style that includes
<sld:Rule>
<sld:MaxScaleDenominator>8000.0</sld:MaxScaleDenominator>
<TextSymbolizer>
<Label>
<ogc:Function name="Recode">
<ogc:PropertyName>data_type</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal> <!-- Other -->
<ogc:Literal>2 1 1 2 </ogc:Literal>
<ogc:Literal>1</ogc:Literal> <!-- Closed -->
<ogc:Literal>1 1</ogc:Literal>
</ogc:Function>
</Label>
</TextSymbolizer>
<sld:LineSymbolizer>
<sld:Stroke>
<sld:CssParameter name="stroke-width">12</sld:CssParameter>
<sld:CssParameter name="stroke">
<ogc:Function name="Recode">
<ogc:PropertyName>congestion_level</ogc:PropertyName>
<ogc:Literal>B</ogc:Literal> <!-- Black -->
<ogc:Literal>#CC0000</ogc:Literal>
<ogc:Literal>R</ogc:Literal> <!-- Red -->
<ogc:Literal>#FF9900</ogc:Literal>
</ogc:Function>
</sld:CssParameter>
<sld:CssParameter name="stroke-dasharray">
<ogc:Function name="Recode">
<ogc:PropertyName>data_type</ogc:PropertyName>
<ogc:Literal>0</ogc:Literal> <!-- Other -->
<ogc:Literal>2 1 1 2 </ogc:Literal>
<ogc:Literal>1</ogc:Literal> <!-- Closed -->
<ogc:Literal>1 1</ogc:Literal>
</ogc:Function>
</sld:CssParameter>
<sld:CssParameter name="stroke-opacity">0.6</sld:CssParameter>
</sld:Stroke>
</sld:LineSymbolizer>
</sld:Rule>
The line label shows the expected value (based on the data_type attribute). The line color is set as expected in the first transform. But the line style is NOT being applied. If I put a copy of the <sld:CssParameter name="stroke-dasharray"> directive without the function it renders as expected (and was hard coded).
Any thoughts on why this might be misbehaving?
And on a related note, there is nothing in the docs, but is there any way to have a 'default/otherwise' type value of last resort in cases where none of the literals match. If not I would recommend this as a useful addition.
--
Tom Saul --- ICx Transportation Group --- 360-620-9975
Conference Bridge: 404-835-7069 or 866-210-1669 : Code 3606209975
Web Conference : URL http://www.atconference.com/meet