|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IClassifyGEN
Provides access to members that control classification.
Classify objects apply one of several methods to statistically subdivide a set of numeric values into classes.
The IClassifyGEN interface is implemented by all the data classification objects (DefinedInterval, EqualInterval, NaturalBreaks, Quantile, StandardDeviation); this is the interface used to pass in histogram data and then classify it into breaks. The ClassID and MethodName properties are used by user interface dialog boxes to identify the classification object and establish what the classification is called.
In general, to classify a dataset, use this interface together with IClassBreaksRenderer. Use the Classify method to add data to the classification; set the number of classes; and generate breaks (typically use the same number of classes specified here for IClassBreaksRenderer.BreakCount). Then apply the classification to the renderer by cycling through ClassBreaks and setting each IClassBreaksRenderer.Break.
The IClassifyGEN interface has been created to use in place of IClassify.
Method Summary | |
---|---|
void |
classify(Object doubleArrayValues,
Object longArrayFrequencies,
int[] numClasses)
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by SystemHelper.classify(com.esri.arcgis.system.IClassifyGEN, double[], int[], int[]) . |
Object |
getClassBreaks()
The array of class breaks (double). |
IUID |
getClassID()
The CLSID for the classification object. |
String |
getMethodName()
The name of the classification method (based on choice of classification object). |
Method Detail |
---|
void classify(Object doubleArrayValues, Object longArrayFrequencies, int[] numClasses) throws IOException, AutomationException
SystemHelper.classify(com.esri.arcgis.system.IClassifyGEN, double[], int[], int[])
.
Classify generates the ClassBreaks based upon the numeric data passed and the number of classes specified.
Pass two safe arrays to the Classify method that must have the same number of elements and an index of zero for their first element. The first array (doubeArrayValues) is the numeric data values, defined as an array of double. This array must be sorted in increasing value order. The second array (longArrayFrequencies) represents the frequency of occurrence of the values, that is, an integer count of the number of times a value occurs.
For example, if the two arrays were called DataValues and DataFrequency, the lowest value would be stored in DataValue(0), and the number of times this value occurred would be stored in DataFrequency(0).
You could populate these arrays in code yourself, but if the data is available through the attribute field of a table, you can utilize the TableHistogram object to gather the data values and frequencies for you.
You must supply the number of desired classes as a variable defined as a Long. Some classification algorithms will return a different number of class breaks to what you specified. The number of classes will be written back to the variable you supplied, so it is always best to recheck the number of class breaks after calling Classify.
doubleArrayValues
- A Variant (in)longArrayFrequencies
- A Variant (in)numClasses
- The numClasses (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.Object getClassBreaks() throws IOException, AutomationException
Note that the Breaks property array on the ClassBreaksRenderer has one less entry than the array returned from Classify. The first break value in the array returned from Classify is put into the ClassBreakRenderers’ MinimumBreak property. Next, copy the break values into the ClassBreaksRenderer object. You can set up the symbol property of the classes at the same time.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getMethodName() throws IOException, AutomationException
MethodName returns the classification method name (as it appears in the classification dialog). Use to determine the CoClass currently implementing IClassifyGEN.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IUID getClassID() throws IOException, AutomationException
Returns the GUID of the classification object.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |