schmitzm.geotools.grid
Class GridZoneStatistic<Z>

java.lang.Object
  extended by schmitzm.geotools.grid.GridZoneStatistic<Z>

public class GridZoneStatistic<Z>
extends Object

Diese Klasse stellt Informationen ueber ein Raster dar, das in Zonen unterteilt ist.

Der Typ, durch den die Zonen identifiziert werden, wird zum Instanzieerungszeitpunkt durch <Z> festgelegt.

Version:
1.0
Author:
Martin Schmitz (University of Bonn/Germany)
See Also:
GridUtil.determineZoneStatistic(GridCoverage2D,GridCoverage2D)}.

Field Summary
protected  SortedMap<Z,Double> cellAvgs
          Speichert den Durchschnitt der Zellwerte pro Zone.
protected  SortedMap<Z,Double> cellSums
          Speichert die Summe der Zellwerte pro Zone.
protected  SortedMap<Z,SortedMap<Double,Integer>> detailCellCounts
          Speichert die Anzahl der Zellen pro Zone und Wert.
protected  SortedMap<Z,Integer> totalCellCounts
          Speichert die Anzahl der Zellen pro Zone.
protected  SortedSet<Z> zones
          Speichert Nummern der Zonen.
 
Constructor Summary
GridZoneStatistic()
          Erzeugt eine leere GridZoneStatistic.
GridZoneStatistic(SortedMap<Z,Integer> totalCellCounts, SortedMap<Z,SortedMap<Double,Integer>> detailCellCounts, SortedMap<Z,Double> cellSums)
          Erzeugt eine GridZoneStatistic.
GridZoneStatistic(SortedMap<Z,Integer> totalCellCounts, SortedMap<Z,SortedMap<Double,Integer>> detailCellCounts, SortedMap<Z,Double> cellSums, SortedMap<Z,Double> cellAvgs)
          Erzeugt eine GridZoneStatistic.
 
Method Summary
 void addValueToZoneStatistic(Z zone, double cellValue)
          Fuegt der Statistik einer Zone einen Wert hinzu.
 void clearZoneStatistic()
          Leert die Statistik aller Zonen.
 void clearZoneStatistic(Z zone)
          Leert die Statistik fuer eine Zone.
 boolean containsZone(Z zone)
          Prueft, ob es eine bestimmte Zone gibt.
 double getCellAvg(Z zone)
          Liefert den Durchschnitt der Zell-Werte in einer Zone
 SortedMap<Z,Double> getCellAvgMap()
          Liefert die Durchschnittswerte der Zellen pro Zone als Map.
 double getCellSum(Z zone)
          Liefert die Summe der Zell-Werte in einer Zone
 SortedMap<Z,Double> getCellSumMap()
          Liefert die Summen der Zellwerte pro Zone als Map.
 int getDetailCellCount(Z zone, double cellValue)
          Liefert die Anzahl an Zellen eines bestimmten Werts in einer Zone.
 SortedMap<Z,SortedMap<Double,Integer>> getDetailCellCountMap()
          Liefert die Zellenanzahl differenziert nach Zellwert fuer alle Zonen.
 SortedMap<Double,Integer> getDetailCellCountMap(Z zone)
          Liefert die Zellenanzahl differenziert nach Zellwert fuer eine Zone.
 int getTotalCellCount(Z zone)
          Liefert die Anzahl an Zellen in einer Zone
 SortedMap<Z,Integer> getTotalCellCountMap()
          Liefert die Gesamt-Zellenanzahl pro Zone als Map.
 int getValueCount(Z zone)
          Liefert Anzahl an verschiedenen Zellen fuer eine Zone.
 SortedSet<Double> getValues(Z zone)
          Liefert die verschiedenen Werte, die in einer Zone vorkommen.
 int getZoneCount()
          Liefert die Anzahl an Zonen.
 SortedSet<Z> getZones()
          Liefert die Nummern der Zonen.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

zones

protected SortedSet<Z> zones
Speichert Nummern der Zonen.


detailCellCounts

protected SortedMap<Z,SortedMap<Double,Integer>> detailCellCounts
Speichert die Anzahl der Zellen pro Zone und Wert.


totalCellCounts

protected SortedMap<Z,Integer> totalCellCounts
Speichert die Anzahl der Zellen pro Zone.


cellSums

protected SortedMap<Z,Double> cellSums
Speichert die Summe der Zellwerte pro Zone.


cellAvgs

protected SortedMap<Z,Double> cellAvgs
Speichert den Durchschnitt der Zellwerte pro Zone.

Constructor Detail

GridZoneStatistic

public GridZoneStatistic()
Erzeugt eine leere GridZoneStatistic. Die Werte der Zonen muessen mittles setZoneStatistic(int,int,double gesetzt werden.


GridZoneStatistic

public GridZoneStatistic(SortedMap<Z,Integer> totalCellCounts,
                         SortedMap<Z,SortedMap<Double,Integer>> detailCellCounts,
                         SortedMap<Z,Double> cellSums)
Erzeugt eine GridZoneStatistic.

Parameters:
cellCounts - Anzahl an Zellen pro Zone
cellSums - Summe der Zellwerte pro Zone

GridZoneStatistic

public GridZoneStatistic(SortedMap<Z,Integer> totalCellCounts,
                         SortedMap<Z,SortedMap<Double,Integer>> detailCellCounts,
                         SortedMap<Z,Double> cellSums,
                         SortedMap<Z,Double> cellAvgs)
Erzeugt eine GridZoneStatistic.

Parameters:
cellCounts - Anzahl an Zellen pro Zone
cellSums - Summe der Zellwerte pro Zone
cellAvgs - Durchschnittswert der Zellen pro Zone
Method Detail

getZoneCount

public int getZoneCount()
Liefert die Anzahl an Zonen.


getZones

public SortedSet<Z> getZones()
Liefert die Nummern der Zonen.


containsZone

public boolean containsZone(Z zone)
Prueft, ob es eine bestimmte Zone gibt.

Parameters:
zone - Nummer der Zone

clearZoneStatistic

public void clearZoneStatistic(Z zone)
Leert die Statistik fuer eine Zone.

Parameters:
zone - Nummer der Zone

clearZoneStatistic

public void clearZoneStatistic()
Leert die Statistik aller Zonen.


addValueToZoneStatistic

public void addValueToZoneStatistic(Z zone,
                                    double cellValue)
Fuegt der Statistik einer Zone einen Wert hinzu.

Parameters:
zone - Nummer der Zone
cellValue - Zell-Wert

getTotalCellCount

public int getTotalCellCount(Z zone)
Liefert die Anzahl an Zellen in einer Zone

Parameters:
zone - Nummer der Zone
Returns:
0 falls es die Zone nicht gibt

getDetailCellCount

public int getDetailCellCount(Z zone,
                              double cellValue)
Liefert die Anzahl an Zellen eines bestimmten Werts in einer Zone.

Parameters:
zone - Nummer der Zone
cellValue - Zell-Wert
Returns:
0 falls es die Zone nicht gibt

getDetailCellCountMap

public SortedMap<Z,SortedMap<Double,Integer>> getDetailCellCountMap()
Liefert die Zellenanzahl differenziert nach Zellwert fuer alle Zonen.


getDetailCellCountMap

public SortedMap<Double,Integer> getDetailCellCountMap(Z zone)
Liefert die Zellenanzahl differenziert nach Zellwert fuer eine Zone.

Parameters:
zone - Nummer der Zone

getValueCount

public int getValueCount(Z zone)
Liefert Anzahl an verschiedenen Zellen fuer eine Zone.

Parameters:
zone - Nummer der Zone

getValues

public SortedSet<Double> getValues(Z zone)
Liefert die verschiedenen Werte, die in einer Zone vorkommen.

Parameters:
zone - Nummer der Zone

getTotalCellCountMap

public SortedMap<Z,Integer> getTotalCellCountMap()
Liefert die Gesamt-Zellenanzahl pro Zone als Map.


getCellSum

public double getCellSum(Z zone)
Liefert die Summe der Zell-Werte in einer Zone

Parameters:
zone - Nummer der Zone
Returns:
0 falls es die Zone nicht gibt

getCellSumMap

public SortedMap<Z,Double> getCellSumMap()
Liefert die Summen der Zellwerte pro Zone als Map.


getCellAvg

public double getCellAvg(Z zone)
Liefert den Durchschnitt der Zell-Werte in einer Zone

Parameters:
zone - Nummer der Zone
Returns:
0 falls es die Zone nicht gibt

getCellAvgMap

public SortedMap<Z,Double> getCellAvgMap()
Liefert die Durchschnittswerte der Zellen pro Zone als Map.