Is this not similar to the aggregate process already implemented
<https://docs.geoserver.org/latest/en/user/services/wps/processes/gs.html>?
You may be able to get a similar result by allowing aggregationAttribute to
have multiple values.
--
Jody Garnett


On Tue, 29 Sep 2020 at 02:21, Marco Volpini <[email protected]>
wrote:

> Dear all,
> I'm writing to propose the creation of a new vector rendering
> transformation and have your feedback about it. The following listing shows
> how it would appear:
>
> <Transformation>
>           <ogc:Function name="vec:GroupingRenderingTransformation">
>             <ogc:Function name="parameter">
>               <ogc:Literal>data</ogc:Literal>
>             </ogc:Function>
>             <ogc:Function name="parameter">
>               <ogc:Literal>groupByAttributes</ogc:Literal>
>               <ogc:Literal>attribute1</ogc:Literal>
>               <ogc:Literal>attribute2</ogc:Literal>
>               ....
>               <ogc:Literal>attributeN</ogc:Literal>
>             </<ogc:Function name="parameter">
>             <ogc:Function name="parameter">
>               <ogc:Literal>aggregator</ogc:Literal>
>               <ogc:Literal>min</ogc:Literal>
>             </ogc:Function>
>           <ogc:Function name="parameter">
>               <ogc:Literal>aggregationAttribute</ogc:Literal>
>               <ogc:Literal>attributeName</ogc:Literal>
>             </ogc:Function>
>           </ogc:Function>
>         </Transformation>
>
>
>    - the groupByAttributes parameter allows to define the feature's
>    attributes to produce the groups on which do aggregation;
>    - the aggregator parameter specifies the aggregation to perform (eg.
>    min/max);
>    - the aggregationAttribute provides the feature attribute used for the
>    aggregation.
>
> For instance, in case of a min aggregation, the rendering transformation
> will allow to return only the feature, for each group, having the minimum
> value for the aggregationAttribute.
>
> Moreover, in order to give a consistent result, the rendering
> transformation will need to be fed with sorted features.
> This would allow to overcome issues that would arise if sorting is handled
> inside the RT:
>
>    - FeatureCollection sort method accepts only one SortBy object, while
>    the RT would allow to define more grouping attributes.
>    - The FeatureCollection sort method doesn't support ComplexFeatures.
>
> In case the RT is issued through a sld, the sortBy attributes can be
> defined through the vendorOption, while in case of a WPS process, they can
> be provided through the Query object.
>
> The output of the rendering transformation will be a FeatureCollection
> wrapper, and the necessary computation will be performed in the hasNext
> method of the corresponding FeatureIterator.
>
> Best regards,
>
> Marco Volpini
>
>
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to