DK11 for ActiveX | TatukGIS_XDK11.ITGIS_StatisticsResult | Interfaces | Methods | Properties
Container for statistics results.
// C# public interface ITGIS_StatisticsResult: ITBaseObject { }
' VisualBasic Public Interface ITGIS_StatisticsResult Implements ITBaseObject End Class
// Oxygene type ITGIS_StatisticsResult = public interface( ITBaseObject ) end;
Name | Visibility | Description | |
---|---|---|---|
AttachDelphiObj | public | Only for internal use of TatukGIS. (Inherited from ITBaseObject) |
|
Complete | public | Finalize and compute all requested statistics. | |
Create_ | public | Create an object. | |
DelphiObj | public | Only for internal use of TatukGIS. (Inherited from ITBaseObject) |
|
Update | public | Adds value to dataset from which statistics will be computed. | |
Name | Visibility | Description | |
---|---|---|---|
AvailableStatistics | public | List of calculated statistics (only requested). | |
Average | public | The average value (arithmetic mean) of dataset. | |
Count | public | Number of valid elements in dataset (not empty, not null). | |
CountMissings | public | Number of empty or null elements in dataset. | |
DatasetType | public | Dataset type; read-only. | |
IgnoreValue | public | Value from dataset which is ignored in statistics; read-only. | |
Majority | public | The value that occurs most often in dataset. | |
Max | public | The maximum value in dataset. | |
Median | public | The median (middle value) of dataset. | |
Min | public | The minimum value in dataset. | |
Minority | public | The value that occurs least often in dataset. | |
Name | public | Name of statistics result; read-only. | |
Percentile | public | Percentiles calculated for requested percentages. | |
Range | public | The difference between maximum and minimum values in dataset. | |
Sample | public | Sample values from dataset. | |
StandardDeviation | public | The standard deviation of dataset. | |
Sum | public | The sum of values in dataset. | |
Unique | public | Unique values from dataset. | |
UseBesselCorrection | public | True if statistics class uses Bessel's correction. | |
Variance | public | The variance of dataset. | |
Variety | public | The number of unique values in dataset. | |
This class is strongly linked with TGIS_StatisticsAbstract
class but it can be also used independently for creating statistics from custom dataset (not layers).
Statistics are calculated for all data types, like numbers, booleans, dates and strings whereby:
True
is converted to 1 and False
to 0.Majority
, Minority
, Variety
and Unique
. The rest of functions take string length into account.
Use IgnoreValue
property to omit specific value in statistics calculations. For pixel layers NoDataValue
is used.
The example below shows how quickly calculate statistics from list of values.
Pseudocode:
// create an instance of TGIS_StatisticsResult stats_result = TGIS_StatisticsResult.Create( TGIS_FieldType.Float, // type of dataset 'my_stats', // name for result TGIS_StatisticalFunctions.BasicStatistics, // use predefined set with basic statistical functions 0 // ignore value ); // collect data (send values to statistics engine) for value in data stats_result.Update(value); // finalize (calculate statistics & fill properties) stats_result.Complete ; //check values if stats_result.Count.Calculated count = stats_result.Count.Value;