Hi list,
I wonder if anyone else has seen something like this.
I have a PostGIS table defined basically as
CREATE TABLE vdline
(
ogc_fid serial NOT NULL,
hast_gener character varying,
kode_hast0 character varying,
hast_lokal double precision,
hast_gaeld double precision,
hast_anbef double precision,
hast_var_h character varying,
geometri geometry(MultiLineString),
CONSTRAINT vdline_pkey PRIMARY KEY (ogc_fid)
)
WITH (
OIDS=FALSE
);
I publish it through GeoServer 2.9.1, using a style looking basically like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>vdline</Name>
<UserStyle>
<Title>Hastighedsgrænser</Title>
<Abstract>Visualisering af hastighedsgrænsedata</Abstract>
<FeatureTypeStyle>
<Rule>
<Name>Skiltet hastighed
40</Name>
<Title>Skiltet
hastighed 40 km/t</Title>
<Abstract>Skiltet
hastighed (hast_lokal) 40 km/t. Etiket viser gældende hastighed
(hast_gaeld)</Abstract>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>hast_lokal</ogc:PropertyName>
<ogc:Literal>40</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#0000ff</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</LineSymbolizer>
<TextSymbolizer>
<Label>
<ogc:Function
name="round"><ogc:PropertyName>hast_gaeld</ogc:PropertyName></ogc:Function>
</Label>
<Font>
<CssParameter name="font-size">10</CssParameter>
<CssParameter
name="font-family">Arial</CssParameter>
<CssParameter
name="font-color">#0000aa</CssParameter>
</Font>
<LabelPlacement>
<LinePlacement>
<PerpendicularOffset>0</PerpendicularOffset>
</LinePlacement>
</LabelPlacement>
<Halo>
<Radius>
<ogc:Literal>1</ogc:Literal>
</Radius>
<Fill>
<CssParameter
name="fill">#f4faf6</CssParameter>
</Fill>
</Halo>
<Fill>
<CssParameter name="fill">#0000aa</CssParameter>
</Fill>
<VendorOption name="maxDisplacement">50</VendorOption>
<VendorOption name="removeOverlaps">true</VendorOption>
<VendorOption name="followLine">true</VendorOption>
<VendorOption name="group">true</VendorOption>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
The complete SLD contains multiple <FeatureTypeStyle>s for various values of
<PropertyName>hast_lokal</PropertyName>.
If I make a GetLegendGraphic-request like
http://hostname/workspace/wms?service=WMS&version=1.1.0&request=GetLegendGraphic&layer=vdline&format=image/png
I get the error:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE
ServiceExceptionReport SYSTEM
"http://gs.demo.geoteamwork.com:80/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd">
<ServiceExceptionReport version="1.1.1" > <ServiceException>
java.lang.IllegalArgumentException: Filter Function problem for function
round argument #0 - expected type float
Filter Function problem for function round argument #0 - expected type float
</ServiceException></ServiceExceptionReport>
If I modify the SLD, specifically the <Label>, removing the <ogc:Function
name="round">, so that it becomes
<Label>
<ogc:PropertyName>hast_gaeld</ogc:PropertyName>
</Label>
I get a nice legend. Is that a bug?
Regards,
/julian
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users