Hi! I am using Dynamic Sybmbolyzer for my layer. In my layer i have a property "TTF_Symbol" which contains a font string like "ttf://<fontname>#<hexcode>" for each feature. I am using it like marks for my features.
The map render works fine, and draw my layer correctly. But when i trying to get legend for my layer using GetLegendGraphic request, i get following error message: <?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://gis.dvo.ru:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" > <ServiceException> java.lang.IllegalArgumentException: The specified mark ${TTF_Symbol} was not found! The specified mark ${TTF_Symbol} was not found! </ServiceException></ServiceExceptionReport> I have tried to avoid it by using LegendGraphic parameter in my SLD style. In the specification (05-077r4_OpenGIS_Symbology_Encoding_Implementation_Specification.pdf) is said: "The LegendGraphic element allows an optional explicit Graphic Symbolizer (described in Subclause 11.3) to be displayed in a legend for this rule." If i correctly understand it, in case when i use <LegendGraphic> parameter in my sld, geoserver shouldn't try to render icon for legend based on PointSymbolyzer rule, but just include in legend icon, which defined in <LegendGraphic>. I added <LegendGraphic> parameter in my SLD, but i still get error above. I have 2 questions: 1) Why map render works fine and legend render fails with that error? 2) Why Geoserver is ignoring <LegendGraphic> and still trying to render legend based on PointSymbolyzer rule? My sld file looks like: <?xml version="1.0" encoding="windows-1251"?> <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>Поле ветра</Name> <UserStyle> <!-- 5' grid nodes. Visible at all scales --> <FeatureTypeStyle> <FeatureTypeName>Feature</FeatureTypeName> <Rule> <Title>All Scales</Title> <LegendGraphic> <Graphic> <ExternalGraphic> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://gis.dvo.ru/svg/Wind_Legend.jpg"/> <Format>image/jpeg</Format> </ExternalGraphic> </Graphic> </LegendGraphic> <ogc:Filter> <ogc:PropertyIsGreaterThanOrEqualTo> <ogc:PropertyName>M4325</ogc:PropertyName> <ogc:Literal>4</ogc:Literal> </ogc:PropertyIsGreaterThanOrEqualTo> </ogc:Filter> <PointSymbolizer> <Geometry> <ogc:PropertyName>the_geom</ogc:PropertyName> </Geometry> <Graphic> <Mark> <WellKnownName>${TTF_Symbol}</WellKnownName> <Fill> <CssParameter name="fill">#000000</CssParameter> </Fill> </Mark> <Size> <ogc:PropertyName>Size</ogc:PropertyName> </Size> <Rotation> <ogc:PropertyName>P0074_00</ogc:PropertyName> </Rotation> </Graphic> </PointSymbolizer> </Rule> </FeatureTypeStyle> <!-- 2.5' grid nodes. Visible at 30M scale and larger --> <FeatureTypeStyle> <FeatureTypeName>Feature</FeatureTypeName> <Rule> <Title>30M scale and larger</Title> <LegendGraphic> <Graphic> <ExternalGraphic> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://gis.dvo.ru/svg/Wind_Legend.jpg"/> <Format>image/jpeg</Format> </ExternalGraphic> </Graphic> </LegendGraphic> <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:PropertyName>M4325</ogc:PropertyName> <ogc:Literal>3</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> <MaxScaleDenominator>3.0E7</MaxScaleDenominator> <PointSymbolizer> <Geometry> <ogc:PropertyName>the_geom</ogc:PropertyName> </Geometry> <Graphic> <Mark> <WellKnownName>${TTF_Symbol}</WellKnownName> <Fill> <CssParameter name="fill">#000000</CssParameter> </Fill> </Mark> <Size> <ogc:PropertyName>Size</ogc:PropertyName> </Size> <Rotation> <ogc:PropertyName>P0074_00</ogc:PropertyName> </Rotation> </Graphic> </PointSymbolizer> </Rule> </FeatureTypeStyle> <!-- 1' grid nodes. Visible at 20M scale and larger --> <FeatureTypeStyle> <FeatureTypeName>Feature</FeatureTypeName> <Rule> <Title>20M scale and larger</Title> <LegendGraphic> <Graphic> <ExternalGraphic> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://gis.dvo.ru/svg/Wind_Legend.jpg"/> <Format>image/jpeg</Format> </ExternalGraphic> </Graphic> </LegendGraphic> <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:PropertyName>M4325</ogc:PropertyName> <ogc:Literal>2</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> <MaxScaleDenominator>2.0E7</MaxScaleDenominator> <PointSymbolizer> <Geometry> <ogc:PropertyName>the_geom</ogc:PropertyName> </Geometry> <Graphic> <Mark> <WellKnownName>${TTF_Symbol}</WellKnownName> <Fill> <CssParameter name="fill">#000000</CssParameter> </Fill> </Mark> <Size> <ogc:PropertyName>Size</ogc:PropertyName> </Size> <Rotation> <ogc:PropertyName>P0074_00</ogc:PropertyName> </Rotation> </Graphic> </PointSymbolizer> </Rule> </FeatureTypeStyle> <!-- 0.5' grid nodes. Visible at 10M scale and larger --> <FeatureTypeStyle> <FeatureTypeName>Feature</FeatureTypeName> <Rule> <Title>10M scale and larger</Title> <LegendGraphic> <Graphic> <ExternalGraphic> <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://gis.dvo.ru/svg/Wind_Legend.jpg"/> <Format>image/jpeg</Format> </ExternalGraphic> </Graphic> </LegendGraphic> <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:PropertyName>M4325</ogc:PropertyName> <ogc:Literal>1</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> <MaxScaleDenominator>1.0E7</MaxScaleDenominator> <PointSymbolizer> <Geometry> <ogc:PropertyName>the_geom</ogc:PropertyName> </Geometry> <Graphic> <Mark> <WellKnownName>${TTF_Symbol}</WellKnownName> <Fill> <CssParameter name="fill">#000000</CssParameter> </Fill> </Mark> <Size> <ogc:PropertyName>Size</ogc:PropertyName> </Size> <Rotation> <ogc:PropertyName>P0074_00</ogc:PropertyName> </Rotation> </Graphic> </PointSymbolizer> </Rule> </FeatureTypeStyle> </UserStyle> </NamedLayer> </StyledLayerDescriptor> Thanks and regards, Sergey. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
