I created a test case and confirmed this problem does not exist on trunk. I can back port the test case to 2.5.x but beyond that we may be stuck; no developers are working on versions prior to 2.5.x...
Jody Jody Garnett wrote: > Cool - what version of geotools are you using? We have been working hard > on the SLDParser on trunk - perhaps this is something we can make a test > case for. > Jody > > Julian Hagenauer wrote: > >> Hi, >> this is my sld, that i am using for drawing simple lines. >> >> <?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>Default Line</Name> >> <UserStyle> >> <Title>A boring default style</Title> >> <Abstract>A sample style that just prints out a blue >> line</Abstract> >> <FeatureTypeStyle> >> <Rule> >> <Name>Rule 1</Name> >> <Title>Blue Line</Title> >> <Abstract>A blue line with a 1 pixel >> width</Abstract> >> <LineSymbolizer> >> <Stroke> >> <CssParameter >> name="stroke">#0000ff</CssParameter> >> </Stroke> >> </LineSymbolizer> >> </Rule> >> <Rule> >> <TextSymbolizer> >> <Label><ogc:PropertyName>name</ogc:PropertyName></Label> >> <Font> >> <CssParameter name="font-family">Arial</CssParameter> >> <CssParameter name="font-style">normal</CssParameter> >> <CssParameter name="font-size">12</CssParameter> >> <CssParameter name="font-weight">normal</CssParameter> >> </Font> >> <LabelPlacement> >> <LinePlacement> >> <PerpendicularOffset>0</PerpendicularOffset> >> </LinePlacement> >> </LabelPlacement> >> </TextSymbolizer> >> </Rule> >> </FeatureTypeStyle> >> </UserStyle> >> </NamedLayer> >> </StyledLayerDescriptor> >> >> If i try to render my map, i get an runtimeexception: >> java.lang.RuntimeException: Parsing failed for TextSymbolizer: >> java.lang.ClassCastException: org.geotools.filter.LiteralExpressionImpl >> cannot be cast to org.geotools.styling.LabelPlacement >> at org.geotools.xml.impl.ParseExecutor.visit(ParseExecutor.java:152) >> at >> org.geotools.xml.impl.BindingWalker$BindingExecutionChain.execute(BindingWalker.java:215) >> at org.geotools.xml.impl.BindingWalker.walk(BindingWalker.java:174) >> at >> org.geotools.xml.impl.ElementHandlerImpl.endElement(ElementHandlerImpl.java:222) >> at >> org.geotools.xml.impl.ParserHandler.endElement(ParserHandler.java:582) >> at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown >> Source) >> >> What is wrong? I tried everything with the labelplacement-tag, but nothing >> seems to solve my problem. Without the labelplacement-thing is renders my >> map perfectly. >> >> Any idea? >> >> Thank you very much, >> Julian >> >> > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Geotools-gt2-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
