|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.geotools.filter.expression.ExpressionAbstract
org.geotools.filter.DefaultExpression
org.geotools.filter.FunctionExpressionImpl
org.geotools.filter.function.ClassificationFunction
Parent for classifiers which break a feature collection into the specified number of classes.
| Field Summary |
| Fields inherited from class org.geotools.filter.DefaultExpression |
expressionType, permissiveConstruction |
| Fields inherited from interface org.geotools.filter.expression.ExpressionType |
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_STRING, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT |
| Constructor Summary | |
ClassificationFunction()
Creates a new instance of ClassificationFunction |
|
| Method Summary | |
protected int |
decimalPlaces(double slotWidth)
Determines the number of decimal places to truncate the interval at (public for testing purposes only). |
abstract java.lang.Object |
evaluate(Feature feature)
Evaluates the expression against an instance of Feature. |
protected double |
fixRound(double value,
int decimalPlaces,
boolean up)
Corrects a round off operation by incrementing or decrementing the decimal place (preferably the smallest one). |
int |
getArgCount()
Returns the number of arguments this |
Expression[] |
getArgs()
Gets the arguments to be evaluated by this function. |
FeatureCollection |
getCollection()
|
Expression |
getExpression()
|
abstract java.lang.String |
getName()
Gets the name of this function. |
int |
getNumberOfClasses()
|
ProgressListener |
getProgressListener()
|
java.lang.Object |
getValue(int index)
|
protected double |
round(double value,
int decimalPlaces)
Truncates a double to a certain number of decimals places. |
void |
setArgs(Expression[] args)
Sets the arguments to be evaluated by this function. |
void |
setCollection(FeatureCollection fc)
|
void |
setExpression(Expression e)
|
void |
setNumberOfClasses(int i)
|
void |
setProgressListener(ProgressListener progress)
|
| Methods inherited from class org.geotools.filter.FunctionExpressionImpl |
accept, getImplementationHints, getParameters, getType, setName, setParameters |
| Methods inherited from class org.geotools.filter.DefaultExpression |
accept, evaluate, getValue, isAttributeExpression, isExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression |
| Methods inherited from class org.geotools.filter.expression.ExpressionAbstract |
eval |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.geotools.filter.expression.FunctionExpression |
getType |
| Methods inherited from interface org.geotools.filter.expression.Expression |
accept, getValue |
| Methods inherited from interface org.opengis.filter.expression.Expression |
accept, evaluate |
| Methods inherited from interface org.geotools.factory.Factory |
getImplementationHints |
| Methods inherited from interface org.opengis.filter.expression.Function |
getParameters, setName, setParameters |
| Constructor Detail |
public ClassificationFunction()
| Method Detail |
public int getArgCount()
FunctionExpression
getArgCount in interface FunctionExpressiongetArgCount in class FunctionExpressionImplpublic int getNumberOfClasses()
public void setNumberOfClasses(int i)
public FeatureCollection getCollection()
public void setCollection(FeatureCollection fc)
public Expression getExpression()
public void setExpression(Expression e)
public ProgressListener getProgressListener()
public void setProgressListener(ProgressListener progress)
public Expression[] getArgs()
FunctionExpression
getArgs in interface FunctionExpressiongetArgs in class FunctionExpressionImplpublic abstract java.lang.String getName()
FunctionExpression
getName in interface FunctionExpressiongetName in class FunctionExpressionImplpublic void setArgs(Expression[] args)
FunctionExpression
setArgs in interface FunctionExpressionsetArgs in class FunctionExpressionImplpublic abstract java.lang.Object evaluate(Feature feature)
ExpressionFeature.
evaluate in interface Expressionevaluate in class DefaultExpressionfeature - Specified feature to use when returning value.
public java.lang.Object getValue(int index)
protected int decimalPlaces(double slotWidth)
slotWidth -
protected double round(double value,
int decimalPlaces)
value - number to round-offdecimalPlaces - number of decimal places to leave
protected double fixRound(double value,
int decimalPlaces,
boolean up)
value - decimalPlaces - up -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||