Maptitude GISDK Help

TestTheme()

Summary

Provides information on the classes created by a call to CreateTheme().

 

Syntax

info = TestTheme(string field_spec, string method, integer num_classes, array options)

 

Argument Contents
field_spec The field spec for the field on which the theme is based
method The method used to generate the classes
num_classes The number of classes you want to create

 

For complete documentation of the methods and options to TestTheme, see CreateTheme().

 

Returns

An array of two elements:

 

Element Type Contents
1 Array Information on the classes that the theme would contain
2 Array Summary and detailed class-by-class statistics

 

Classes Type Contents
1 Array An array of class labels (strings), starting with the label for the Other class (if it exists) and followed by the labels for the remaining classes
2 Array An array of class value definitions; this could be an array of strings; an array of real numbers, or an array of {real low_value, boolean low_inclusive, real hi_value, boolean hi_inclusive}. No definition is provided for the Other class
3 Array An array of integers indicating the number of features in each class, starting with the count for the Other class (if it exists) and followed by the counts for the remaining classes

 

Statistics element Type Contents
1 Array Aggregate theme statistics
2 Array An array of statistics for each class, starting with the Other class (if it exists) followed by the remaining classes

 

Theme Statistics Type Contents
1 Integer Number of features
2 Integer Number of features used
3 Integer Number of missing features
4 Integer Number of features below the minimum value
5 Integer Number of features above the maximum value
6 Real Sum of the data values
7 Real Minimum data value
8 Real Maximum data value
9 Real Mean of the data values
10 Real Variance of the data values
11 Real Standard deviation of the data values
12 Real Skewness of the data values
13 Real Kurtosis of the data values
14 Real Median data value
15 Real Goodness of variance fit (GVF) of the data values
16 Real Goodness of absolute deviation fit (GADF) of the data values
17 Real F of the data values

 

Class Statistics Type Contents
1 Integer Number of features in the class
2 Real Sum of the data values in the class
3 Real Minimum data value in the class
4 Real Maximum data value in the class
5 Real Mean of the data values in the class
6 Real Variance of the data values in the class
7 Real Standard deviation of the data values in the class
8 Real Median data value in the class
9 Real Percent of the data values contained by the class

 

Notes

Example

// An income theme with eight classes

thm1 = TestTheme("County|Income", "Quantiles", 8, )

 

//This theme has a break in class values at $30,000, and the low and high values are rounded

thm2 = TestTheme("County|Income", "Quantiles", 8, {

     {"Force Value", 30000},

     {"Pretty Values", "True")})

 

//This theme has classes that are created manually

thm3 = TestTheme("Regions|Sales", "Manual", 5, {

     {"Values", {

          {0, "True", 1000, "False"},

          {1000, "True", 2500, "False"},

          {2500, "True", 10000, "False"},

          {10000, "True", 25000, "False"},

          {25000, "True", 100000, "True"}}

     })

 

 

//This theme has classes containing the top ten; second ten; etc.

thm4 = TestTheme("Customer|Sales", "Counts", 5, {

     {"Values", {10, 10, 10, 10, 10},

     {"Sort Order", "Descending"}

     })

 

Error Codes

Error Meaning
NotFound There is no current layer, or the specified field(s) do not exist on the current layer
Escape The user interrupted scanning of the data
Error An argument or option has the wrong type or the wrong number of values; or an error occurred while scanning the data

 

See Also

Function Summary
ClearThemeValues() Remove the data used to generate a theme from memory
CreateTheme() Creates a color or pattern theme on the current layer
GetTheme() Gets information about a theme

 

 

©2025 Caliper Corporation www.caliper.com