Add a group by visitor

Description

The current aggregation visitors (AverageVisitor, CountVisitor, MaxVisitor, MedianVisitor, MinVisitor, StandardDeviationVisitor and SumVisitor) don’t support a “group by” behavior. For example, we are able to compute the average electrical consumption per building. But we are not able to ask the average electrical consumption per building type.

The idea is to add new "group by" visitor that will be able to group features by type and apply a visitor on them. The JDBCDataStore will be extend to natively support the "group by" behavior. The existing Aggregator process will also be extended to support the "group by" behavior.

All of this will be done preserving backwards compatibility.

Mailing list discussion about this:
http://osgeo-org.1560.x6.nabble.com/Adding-quot-group-by-quot-support-to-the-current-aggregation-visitors-td5249393.html

Environment

None

Activity

Show:
Jody Garnett
February 18, 2016, 5:51 AM

Really impressed with the pull request, request a code example for the docs.

There is an enum GroupByVisitor.AggregateVisitor that is not strictly speaking a visitor (and may wish to be refactored out as a standalone class).

Nuno Oliveira
February 20, 2016, 10:28 AM

Pull request merged https://github.com/geotools/geotools/pull/1120 closing the issue.

Ben Caradoc-Davies
February 22, 2016, 10:56 PM

Causes build failure in xmlcodegen. See:

Ben Caradoc-Davies
February 23, 2016, 1:50 AM

"Fix versions" records the releases which include this fix. It is not an aspirational tag. As far as I can tell, this fix has only been applied to master (15-beta).

Nuno Oliveira
February 23, 2016, 9:00 AM

You are right this as not yet be back ported I will be more careful with this in the future sorry.

Fixed

Assignee

Nuno Oliveira

Reporter

Nuno Oliveira

Triage

None

Components

Fix versions

Priority

Medium
Configure