Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Problem with custom SLD style

I have a customized SLD style files for my layers on the map. I were working perfectly with uDig 1.1 / GeoTools 2.2.* release.

But it crashed with GeoTools 2.6.4 (or is it 2.6-SNAPSHOT - no difference with 2.6.4 as I see).

<sld:LineSymbolizer>
                        <sld:Stroke>
                            <sld:CssParameter name="stroke">
                                <ogc:Function name="if_then_else">
									<ogc:Function name="lessThan">
										<ogc:PropertyName>VOLTAGE_ID</ogc:PropertyName>
										<ogc:Literal>3</ogc:Literal>
									</ogc:Function>
									<ogc:Literal>#FFBB55</ogc:Literal>
									<ogc:Function name="if_then_else">
										<ogc:Function name="lessThan">
											<ogc:PropertyName>VOLTAGE_ID</ogc:PropertyName>
											<ogc:Literal>7</ogc:Literal>
										</ogc:Function>
										<ogc:Literal>#F78484</ogc:Literal>
										<ogc:Literal>#5C993C</ogc:Literal>
									</ogc:Function>
								</ogc:Function>
......

and it crashes

java.lang.IllegalArgumentException: Filter Function problem for function if_then_else argument #0 - expected type boolean at org.geotools.filter.function.FilterFunction_if_then_else.evaluate(FilterFunction_if_then_else.java:45) at org.geotools.filter.expression.ExpressionAbstract.evaluate(ExpressionAbstract.java:63)
	at org.geotools.styling.SLD.color(SLD.java:1312)
	at org.geotools.styling.SLD.color(SLD.java:96)
	at org.geotools.styling.SLD.lineColor(SLD.java:84)
	at org.geotools.styling.SLD.color(SLD.java:188)
	at net.refractions.udig.ui.Drawing.paint(Drawing.java:308)
	at net.refractions.udig.ui.Drawing.drawFeature(Drawing.java:246)
	at net.refractions.udig.ui.Drawing.drawFeature(Drawing.java:223)
	at net.refractions.udig.ui.Drawing.drawDirect(Drawing.java:150)
	at net.refractions.udig.ui.graphics.Glyph$6.getImageData(Glyph.java:363)
.......

Wanted to have a look on http://geotools.org/javadocs/ but got 404 :/

Can anybody help me how to change my .sld file?

regards

Lukasz




Back to the top