|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.system.EqualInterval
public class EqualInterval
Defines an equal interval classification method.
The EqualInterval coclass subdivides the data range by the number of classes to produce the equal value intervals for each class. Optionally, you can use the IClassifyMinMax interface to specify just minimum and maximum values instead of setting the data values using IClassify::SetHistogramData.
This classification emphasizes how data values fall within uniform ranges of values. In practice, it is similar to defined intervals but has the advantage that the lowest and highest classes span the same range of values as the rest of the classes. An example of an application of this classification is a map that depicts homes for sale divided into equal ranges of purchase costs.
The EqualInterval object can additionally generate class breaks given only Minimum and Maximum values. In this case, you do not have to call IClassify::SetHistogramData. However, to be consistent with other classify objects, you can also call IClassify::SetHistogramData, which will override the minimum and maximum values. The Minimum and Maximum properties are write-only, and you must set both properties if you can use IClassifyMinMax.
Constructor Summary | |
---|---|
EqualInterval()
Constructs a EqualInterval using ArcGIS Engine. |
|
EqualInterval(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. EqualInterval theEqualInterval = (EqualInterval) obj; |
Method Summary | |
---|---|
void |
classify(int[] numClasses)
Classifies data into the specified number of classes. |
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[]) . |
void |
classifyMinMax(double min,
double max,
int[] numClasses)
Classifies a data range defined by a minimum and maximum value into the specified number of classes. |
boolean |
equals(Object o)
Compare this object with another |
Object |
getClassBreaks()
The array of class breaks (double). |
IUID |
getClassID()
The CLSID for the classification object. |
static String |
getClsid()
getClsid. |
String |
getMethodName()
The name of the classification method (based on choice of classification object). |
int |
hashCode()
the hashcode for this object |
void |
setHistogramData(Object doubleArrayValues,
Object longArrayFrequencies)
Adds data in form of a histogram (array of values (doubles) and a paired array of frequencies (longs)) to the classification. |
void |
setMaximum(double rhs1)
The maximum value. |
void |
setMinimum(double rhs1)
The minimum value. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef |
---|
getJintegraDispatch, release |
Constructor Detail |
---|
public EqualInterval() throws IOException, UnknownHostException
IOException
- if there are interop problems
UnknownHostException
- if there are interop problemspublic EqualInterval(Object obj) throws IOException
EqualInterval theEqualInterval = (EqualInterval) obj;
obj
to EqualInterval
.
obj
- an object returned from ArcGIS Engine or Server
IOException
- if there are interop problemsMethod Detail |
---|
public static String getClsid()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public 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.
classify
in interface IClassifyGEN
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.public 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.
getClassBreaks
in interface IClassify
getClassBreaks
in interface IClassifyGEN
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public 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.
getMethodName
in interface IClassify
getMethodName
in interface IClassifyGEN
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.StandardDeviation
,
EqualInterval
,
NaturalBreaks
,
ClassBreaksRenderer
,
DefinedInterval
,
Quantile
public IUID getClassID() throws IOException, AutomationException
Returns the GUID of the classification object.
getClassID
in interface IClassify
getClassID
in interface IClassifyGEN
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setHistogramData(Object doubleArrayValues, Object longArrayFrequencies) throws IOException, AutomationException
To pass numeric data into the Classify object, the SetHistogramData method is used. This takes two safe arrays that must have the same number of elements and an index of zero for their first element. The first array is the numeric data values, defined as an array of double. This array must be sorted in increasing value order. The second array 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.
setHistogramData
in interface IClassify
doubleArrayValues
- A Variant (in)longArrayFrequencies
- A Variant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void classify(int[] numClasses) throws IOException, AutomationException
Classify generates the ClassBreaks given the number of classes specified. Use Classify only after you have added data to the classification using SetHistogramData.
Having obtained the data values and frequencies using the SetHistogramData method, the next step is to compute some class breaks. Do this by calling the Classify method and specifying the number of classes you would like. 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.
classify
in interface IClassify
numClasses
- The numClasses (in/out: use single element array)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMinimum(double rhs1) throws IOException, AutomationException
Set the Minimum value in order to generate class breaks with the IClassify.Classify method. You will also need to set the Maximum value before generating the class breaks.
setMinimum
in interface IClassifyMinMax
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void setMaximum(double rhs1) throws IOException, AutomationException
Set the Maximum value in order to generate class breaks with the IClassify.Classify method. You also will need to set the Minimum value before generating the class breaks.
setMaximum
in interface IClassifyMinMax
rhs1
- The rhs1 (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void classifyMinMax(double min, double max, int[] numClasses) throws IOException, AutomationException
Use the ClassifyMinMax method to generate class breaks based upon the minimum and maximum values specified and the number of classes specified.
Use this method as an alternative to setting the IClassifyMinMax.Minimum and IClassifyMinMax.Maximum properties and then calling IClassify.Classify method.
classifyMinMax
in interface IClassifyMinMax2
min
- The min (in)max
- The max (in)numClasses
- The numClasses (in/out: use single element array)
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 |