Class FeatureCollectionAggregator

java.lang.Object
org.openjump.core.ui.plugin.tools.aggregate.FeatureCollectionAggregator

public class FeatureCollectionAggregator extends Object
Creates a new FeatureDataset from a source FeatureCollection,
  • a list of attributes to be used as the key
  • a list of aggregator function to aggregate attribute values which are not part of the key
  • Constructor Details

    • FeatureCollectionAggregator

      public FeatureCollectionAggregator(FeatureCollection fc, List<String> keyAttributes, List<AttributeAggregator> aggregators) throws org.openjump.core.ui.plugin.tools.aggregate.FeatureCollectionAggregator.AggregatorException
      Throws:
      org.openjump.core.ui.plugin.tools.aggregate.FeatureCollectionAggregator.AggregatorException
  • Method Details

    • getAggregatedFeatureCollection

      public FeatureCollection getAggregatedFeatureCollection()
      Returns a FeatureCollection where attributes defined by aggregators are aggregated on features having the same key. Feature's key are defined by one or more attributes from the source featureCollection.
      Returns:
      the featureCollection with aggregated attributes