I created a modified PointStacker which stacks/clusters the data features according to an indicated attribute of the data set (e.g. state or district) which is a user-indicated parameter in the sld style file.
When I am looking at the entire map extent, it works fine. For instance, I have 20 states and for each of them a cluster point with its number of clustered features is displayed. However, when I zoom into the map, and a state is not completely within the view anymore, the input data for this state is less than before, thus, the number of clustered features for this state is getting less as well - which is not my intended behaviour for this case. I do not want to cluster only the features within the view, but to cluster the entire data extent - independetly from my zoom level, thus view extent.
Is there any way to accomplish something like a constant data bounding box to request data from independently from zooming?
<?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>xyz</Name>
<UserStyle>
<Title>xyz</Title>
<FeatureTypeStyle>
<Transformation>
<ogc:Function name="gs:PointStackerAttribute">
<ogc:Function name="parameter">
<ogc:Literal>data</ogc:Literal>
</ogc:Function>
<ogc:Function name="parameter">
<ogc:Literal>clusterattribute</ogc:Literal>
<ogc:Literal>state</ogc:Literal>
</ogc:Function>
...
<ogc:Function name="parameter">
<ogc:Literal>outputBBOX</ogc:Literal>
<ogc:Function name="env">
<ogc:Literal>wms_bbox</ogc:Literal>
</ogc:Function>
</ogc:Function>
<ogc:Function name="parameter">
<ogc:Literal>outputWidth</ogc:Literal>
<ogc:Function name="env">
<ogc:Literal>wms_width</ogc:Literal>
</ogc:Function>
</ogc:Function>
<ogc:Function name="parameter">
<ogc:Literal>outputHeight</ogc:Literal>
<ogc:Function name="env">
<ogc:Literal>wms_height</ogc:Literal>
</ogc:Function>
</ogc:Function>
</ogc:Function>
</Transformation>
<Rule>
...
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>