Package org.geotools.filter.function
Class Classifier
- Object
-
- Classifier
-
- Direct Known Subclasses:
ExplicitClassifier
,RangedClassifier
public abstract class Classifier extends Object
The data structure returned by classification functions. We can take this object, tweak it, and then pass it to a ClassifyFunction.- Author:
- Cory Horner, Refractions Research
-
-
Constructor Summary
Constructors Constructor Description Classifier()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract int
classify(Object value)
Returns the slot this value belongs in.int
classify(Expression expr, Object feature)
Returns the slot containing the passed expression's value.double[]
getPercentages()
abstract int
getSize()
String
getTitle(int slot)
String[]
getTitles()
void
setPercentages(double[] percentages)
void
setTitle(int slot, String title)
void
setTitles(String... titles)
-
-
-
Method Detail
-
getTitles
public String[] getTitles()
-
setTitles
public void setTitles(String... titles)
-
setTitle
public void setTitle(int slot, String title)
-
getTitle
public String getTitle(int slot)
-
classify
public int classify(Expression expr, Object feature)
Returns the slot containing the passed expression's value.
-
classify
public abstract int classify(Object value)
Returns the slot this value belongs in.- Returns:
- index, starting from zero
-
getSize
public abstract int getSize()
- Returns:
- the number of bins
-
getPercentages
public double[] getPercentages()
- Returns:
- percentages for each class
-
setPercentages
public void setPercentages(double[] percentages)
- Parameters:
percentages
- a double array with percentages for each class
-
-