Dear All ..
My in one table of my datasource (storage=PostGis, type=POINT), I have
column called "bearing" with type "double precission".
I want to display the points wil simple WellKnownName "Arrow", but I
want to rotate it dynamicaly based on the value of "bearing" column.
I Tried this in SLD:
<Rotation>
<CssParameter
name="rotation"><ogc:PropertyName>bearing</ogc:PropertyName></CssParameter>
</Rotation>
Note : complete sld attached
The Geoserver SLD validator said it's not-valid with msg :
----BEGIN ERROR---
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
was found starting with element 'CssParameter'. One of
'{"http://www.opengis.net/ogc":expression}' is expected.
----END ERROR---
How is the valid methode to do dynamic symbol rotation based on point
attribute ?
Sincerely
-bino-
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" 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"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>Taxi</Name>
<UserStyle>
<Title>Default point</Title>
<Abstract>A sample style that just prints out a 6px wide red arrow</Abstract>
<FeatureTypeStyle>
<!--FeatureTypeName>Feature</FeatureTypeName-->
<Rule>
<MaxScaleDenominator>160000</MaxScaleDenominator>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>arrow</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
</Stroke>
</Mark>
<Size>12</Size>
<Rotation>
<CssParameter name="rotation"><ogc:PropertyName>bearing</ogc:PropertyName></CssParameter>
</Rotation>
</Graphic>
</PointSymbolizer>
<TextSymbolizer>
<Label>
<ogc:PropertyName>label</ogc:PropertyName>
</Label>
<Font>
<CssParameter name="font-weight">bold</CssParameter>
</Font>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
</TextSymbolizer>
</Rule>
<Rule>
<MinScaleDenominator>160001</MinScaleDenominator>
<MaxScaleDenominator>2560000</MaxScaleDenominator>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>arrow</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
</Stroke>
</Mark>
<Size>8</Size>
<Rotation>
<CssParameter name="rotation"><ogc:PropertyName>bearing</ogc:PropertyName></CssParameter>
</Rotation>
</Graphic>
</PointSymbolizer>
<TextSymbolizer>
<Label>
<ogc:PropertyName>label</ogc:PropertyName>
</Label>
<Fill>
<CssParameter name="fill">#000000</CssParameter>
</Fill>
</TextSymbolizer>
</Rule>
<Rule>
<MinScaleDenominator>2560001</MinScaleDenominator>
<MaxScaleDenominator>40960000</MaxScaleDenominator>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>arrow</WellKnownName>
<Fill>
<CssParameter name="fill">#00FF00</CssParameter>
</Fill>
</Mark>
<Size>6</Size>
<Rotation>
<CssParameter name="rotation"><ogc:PropertyName>bearing</ogc:PropertyName></CssParameter>
</Rotation>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users