So basically, I have a map at day D. On this day X objects are represented with a color and full opacity.
What I'd like to do is to be able to represent on this map the Y objects present on the map at D-1, D-2, ..., D-25, on which I ll apply a gradually decreasing opacity.
Currently, I bound an SLD file to my layer with 25 rules. A rule define the opacity and the color of the object (1 rule for 1 day, so a rule for D-1, a rule for D-2 etc).
But this is not working, as geoserver is giving me back a GC overhead limit exceeded
error.
Is there any other way to do it ? I may be unclear, so feel free to ask for more details, I ll edit my post.
EDIT : heres a peek at my SLD.
This is the rule I repeat 25 times in my SLD file.
What change between each rule are the variables dateXmin
and dateXmax
who become dateXminJ1
and dateXmaxJ1
and so on 'till dateXminJ25
and dateXmaxJ25
.
For the record I have a SLD file that repeat this rule 3 times, and Geoserver is giving me back an image almost instantly.
<FeatureTypeStyle>
<Rule>
<Name>style_update_img</Name>
<ogc:Filter>
<ogc:And>
<ogc:Or>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>table_name</ogc:PropertyName>
<ogc:Function name="env"><ogc:Literal>name1</ogc:Literal><ogc:Literal>default</ogc:Literal></ogc:Function>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>table_name</ogc:PropertyName>
<ogc:Function name="env"><ogc:Literal>name2</ogc:Literal><ogc:Literal>default</ogc:Literal></ogc:Function>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>table_name</ogc:PropertyName>
<ogc:Function name="env"><ogc:Literal>name3</ogc:Literal><ogc:Literal>default</ogc:Literal></ogc:Function>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>table_name</ogc:PropertyName>
<ogc:Function name="env"><ogc:Literal>name4</ogc:Literal><ogc:Literal>default</ogc:Literal></ogc:Function>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>table_name</ogc:PropertyName>
<ogc:Function name="env"><ogc:Literal>name5</ogc:Literal><ogc:Literal>default</ogc:Literal></ogc:Function>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>table_name</ogc:PropertyName>
<ogc:Function name="env"><ogc:Literal>name6</ogc:Literal><ogc:Literal>default</ogc:Literal></ogc:Function>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>table_name</ogc:PropertyName>
<ogc:Function name="env"><ogc:Literal>name7</ogc:Literal><ogc:Literal>default</ogc:Literal></ogc:Function>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>table_name</ogc:PropertyName>
<ogc:Function name="env"><ogc:Literal>name8</ogc:Literal><ogc:Literal>default</ogc:Literal></ogc:Function>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>table_name</ogc:PropertyName>
<ogc:Function name="env"><ogc:Literal>name9</ogc:Literal><ogc:Literal>default</ogc:Literal></ogc:Function>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>table_name</ogc:PropertyName>
<ogc:Function name="env"><ogc:Literal>name10</ogc:Literal><ogc:Literal>default</ogc:Literal></ogc:Function>
</ogc:PropertyIsEqualTo>
</ogc:Or>
<ogc:And>
<ogc:PropertyIsGreaterThanOrEqualTo>
<ogc:PropertyName>daterec</ogc:PropertyName>
<ogc:Function name="strConcat">
<ogc:Function name="env"><ogc:Literal>dateXmin</ogc:Literal><ogc:Literal>2017-01-01</ogc:Literal></ogc:Function><ogc:Literal>T00:00:00.0Z</ogc:Literal>
</ogc:Function>
</ogc:PropertyIsGreaterThanOrEqualTo>
<ogc:PropertyIsLessThan>
<ogc:PropertyName>daterec</ogc:PropertyName>
<ogc:Function name="strConcat">
<ogc:Function name="env"><ogc:Literal>dateXmax</ogc:Literal><ogc:Literal>2017-01-01</ogc:Literal></ogc:Function><ogc:Literal>T00:00:00.0Z</ogc:Literal>
</ogc:Function>
</ogc:PropertyIsLessThan>
</ogc:And>
</ogc:And>
</ogc:Filter>
<PolygonSymbolizer>
<Geometry>
<ogc:Function name="buffer">
<ogc:PropertyName>geom</ogc:PropertyName>
<ogc:Function name="env"><ogc:Literal>buffer</ogc:Literal><ogc:Literal>200</ogc:Literal></ogc:Function>
</ogc:Function>
</Geometry>
<Fill>
<CssParameter name="fill">
<ogc:Function name="strConcat">
<ogc:Literal>#</ogc:Literal><ogc:Function name="env"><ogc:Literal>color</ogc:Literal><ogc:Literal>B9121B</ogc:Literal></ogc:Function>
</ogc:Function>
</CssParameter>
<CssParameter name="fill-opacity">
<ogc:Literal>0.92</ogc:Literal>
</CssParameter>
</Fill>
</PolygonSymbolizer>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">
<ogc:Literal>#</ogc:Literal><ogc:Function name="env"><ogc:Literal>color</ogc:Literal><ogc:Literal>B9121B</ogc:Literal></ogc:Function>
</CssParameter>
<CssParameter name="stroke-opacity">
<ogc:Literal>0.87</ogc:Literal>
</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>