DK11 for ActiveX | TatukGIS_XDK11.ITGIS_StatisticsAbstract | Interfaces | Methods | Properties
General statistics class. Must be derived.
// C# public interface ITGIS_StatisticsAbstract: ITBaseObject { }
' VisualBasic Public Interface ITGIS_StatisticsAbstract Implements ITBaseObject End Class
// Oxygene type ITGIS_StatisticsAbstract = public interface( ITBaseObject ) end;
Name | Visibility | Description | |
---|---|---|---|
Add | public | Add statistics result definition. _{ } | |
AddAll | public | Add statistics result definitions for all available datasets. _{ } | |
AddAll_2 | public | Add statistics result definitions for all available datasets. _{ } | |
Add_2 | public | Add statistics result definition. _{ } | |
Add_3 | public | Add statistics result definition. _{ } | |
Add_4 | public | Add statistics result definition. _{ } | |
AttachDelphiObj | public | Only for internal use of TatukGIS. _{ (Inherited from ITBaseObject) } | |
Calculate | public | Calculate requested statistics from the entire layer. _{ } | |
Calculate_2 | public | Calculate requested statistics from filtered elements of the layer. _{ } | |
DelphiObj | public | Only for internal use of TatukGIS. _{ (Inherited from ITBaseObject) } | |
Get | public | Get statistics result by name. _{ } | |
LoadFromFile | public | Parse statistics file and load all information into parent layer. _{ } | |
LoadFromFile_2 | public | Parse statistics file and load all information into parent layer. _{ } | |
Reset | public | Reset statistics object to initial state. _{ } | |
ResetModified | public | Undo changes in requested statistics definitions. _{ } | |
SaveToFile | public | Save layer statistics into auxiliary file. _{ } | |
SaveToFile_2 | public | Save layer statistics into auxiliary file. _{ } | |
Name | Visibility | Description | |
---|---|---|---|
Age | public | Age of the statistics. _{} | |
AvailableResults | public | List of available results names; read-only. _{} | |
DefinedResults | public | List of already defined results names; read-only. _{} | |
FastStatistics | public | Determines the state if 'Fast Statistics' was computed; read-only. _{} | |
Modified | public | True if requested statistics have changed. _{} | |
Obsolete | public | Check validity of statistics. _{} | |
UseBesselCorrection | public | If True, statistics class will use Bessel's correction. _{} | |
This class provide access to generating, saving and loading layer's statistics.
TGIS_StatisticalFunction
enum contains a list of available statistical functions. These functions are also presented in the table below.
Function name | Basic | Standard | All | Description |
---|---|---|---|---|
Average | + | + | + | The average value (arithmetic mean) of dataset. |
Count | + | + | + | Number of valid elements in dataset (not empty, not null). |
CountMissings | + | + | Number of empty or null elements in dataset. | |
Max | + | + | + | The maximum value in dataset. |
Majority | + | The value that occurs most often in dataset. | ||
Median | + | + | The median (middle value) of dataset. | |
Min | + | + | + | The minimum value in dataset. |
Minority | + | The value that occurs least often in dataset. | ||
Range | + | + | The difference between maximum and minimum values in dataset. | |
StandardDeviation | + | + | The standard deviation of dataset. | |
Sum | + | + | + | The sum of values in dataset. |
Variance | + | + | The variance of dataset. | |
Variety | + | The number of unique values in dataset. | ||
Unique | + | Extracting unique values from dataset. |
TGIS_StatisticalFunctions
is used to define requested statistics. Predefined groups can be used:
EmptyStatistics
,BasicStatistics
,StandardStatistics
(this is default),AllStatistics
.
Statistical results can be narrowed by setting Extent
, Shape
, Relation
properties.
By default, the statistics engine calculates population standard deviation and variance (divider equals āNā). Sample variance and standard deviation (divider equals āN-1ā) can be calculated by setting UseBesselCorrection
to True
.
See:
Pseudocode:
// add all fields from vector layer or bands from pixel layer layer.Statistics.AddAll(TGIS_StatisticalFunctions.BasicStatistics); layer.Statistics.Calculate; // demand a result stats_result = layer.Statistics.Get(<valid_name>);
Valid names are listed in the stats.AvailableResults
list.
// check calculated values average = stats_result.Average.Value; count = stats_result.Count.Value; min = stats_result.Min.Value; max = stats_result.Max.Value; sum = stats_result.Sum.Value;