Hi, I was wondering whether anyone might have some useful advice regarding
how i can shorten the length of my SLD? My SLD is currently composed of one
transformation and 68 rules, and is currently over 2000 lines long! The
reason it is so long is because the SLD classifies data into wind barb
symbols (currently external graphics, but these will be replaced to a font
once the font has been uploaded onto my companies geoserver), therefore
there are two filters the data must go through; the first filter assigns the
data to the northern or southern hemisphere, and the second filter then
assigns the data to the correct wind barb symbol according to wind speed
(the wind barbs are not the same in both hemispheres, hence the first
filter).
In essence, it would be great if i could combine these two filters within
one rule, so that there will only be 34 rules instead or, better yet, maybe
there is a way i can call a maths filter function to filter the data
according to the relationship between wind barb font name and the variable
range? (these are suggestions that have been made to me but as i am quite
new to SLD's, i have little idea of if/ how i can do this).
Any advice would be greatly appreciated,
Christine
FYI: Below is a copy of my transformation and the first two rules:
<NamedLayer>
<Name>geos:mideast_prmsl.t00z.pgrbf24</Name>
<UserStyle>
<Title>y component</Title>
<Abstract>Symbol</Abstract>
<FeatureTypeStyle>
<Transformation>
<ogc:Function name="gs:RasterAsPointCollection">
<ogc:Function name="parameter">
<ogc:Literal>data</ogc:Literal>
</ogc:Function>
</ogc:Function>
</Transformation>
<Rule>
<Name>Northern Hemisphere - 0 knotts </Name>
<ogc:Filter>
<And>
<ogc:PropertyIsGreaterThanOrEqualTo>
<ogc:Function name="getY">
<ogc:PropertyName>the_geom</ogc:PropertyName>
</ogc:Function>
<ogc:Literal>0</ogc:Literal>
</ogc:PropertyIsGreaterThanOrEqualTo>
<ogc:PropertyIsLessThan>
<ogc:PropertyName>GRAY_INDEX</ogc:PropertyName>
<ogc:Literal>2.5</ogc:Literal>
</ogc:PropertyIsLessThan>
</And>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple"
xlink:href="http://fgwfhp014/pics/wind_barb_symbology/0knots.png"/>
<Format>image/png</Format>
</ExternalGraphic>
<Size>30</Size>
<Rotation>
<ogc:Sub>
<ogc:Function name="IEEERemainder">
<ogc:PropertyName>GRAY_INDEX</ogc:PropertyName>
<ogc:Function name="parseDouble">
<ogc:Literal>360</ogc:Literal>
</ogc:Function>
</ogc:Function>
<ogc:Literal>90</ogc:Literal>
</ogc:Sub>
</Rotation>
</Graphic>
</PointSymbolizer>
</Rule>
<Rule>
<Name>Southern Hemisphere - 0 knotts </Name>
<ogc:Filter>
<And>
<ogc:PropertyIsLessThan>
<ogc:Function name="getY">
<ogc:PropertyName>the_geom</ogc:PropertyName>
</ogc:Function>
<ogc:Literal>0</ogc:Literal>
</ogc:PropertyIsLessThan>
<ogc:PropertyIsLessThan>
<ogc:PropertyName>GRAY_INDEX</ogc:PropertyName>
<ogc:Literal>2.5</ogc:Literal>
</ogc:PropertyIsLessThan>
</And>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple"
xlink:href="http://fgwfhp014/pics/wind_barb_symbology/0knots.png"/>
<Format>image/png</Format>
</ExternalGraphic>
<Size>30</Size>
<Rotation>
<ogc:Sub>
<ogc:Function name="IEEERemainder">
<ogc:PropertyName>GRAY_INDEX</ogc:PropertyName>
<ogc:Function name="parseDouble">
<ogc:Literal>360</ogc:Literal>
</ogc:Function>
</ogc:Function>
<ogc:Literal>90</ogc:Literal>
</ogc:Sub>
</Rotation>
</Graphic>
</PointSymbolizer>
</Rule>
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Advice-for-shortening-a-68-rule-SLD-tp5056349.html
Sent from the GeoServer - User mailing list archive at Nabble.com.