org.geotools.filter
Class InterpolateFunction

Object
  extended by InterpolateFunction
All Implemented Interfaces:
Expression, Function

public class InterpolateFunction
extends Object
implements Function

Implementation of "Interpolation" as a normal function.

This implementation is compatible with the Function interface; the parameter list can be used to set the threshold values etc...

This function expects:

  1. PropertyName; use "Rasterdata" to indicate this is a colour map
  2. Literal: lookup value
  3. Literal: InterpolationPoint : data 1
  4. Literal: InterpolationPoint : value 1
  5. Literal: InterpolationPoint : data 2
  6. Literal: InterpolationPoint : value 2
  7. Literal: Mode
  8. Literal: Method
In reality any expression will do.

Author:
Johann Sorel (Geomatys)
Module:
modules/library/render (gt-render.jar)

Nested Class Summary
static class InterpolateFunction.Name
          Describe how this function works.
 
Field Summary
static String METHOD_COLOR
          Use as a literal value to indicate interpolation method
static String METHOD_NUMERIC
          Use as a literal value to indicate interpolation method
static String MODE_COSINE
          Use as a literal value to indicate interpolation mode
static String MODE_CUBIC
          Use as a literal value to indicate interpolation mode
static String MODE_LINEAR
          Use as a literal value to indicate interpolation mode
static FunctionName NAME
          Make the instance of FunctionName available in a consistent spot.
static String RASTER_DATA
          Use as a PropertyName when defining a color map.
 
Fields inherited from interface Expression
NIL
 
Constructor Summary
InterpolateFunction()
           
InterpolateFunction(List<Expression> parameters, Literal fallback)
           
 
Method Summary
 Object accept(ExpressionVisitor visitor, Object extraData)
           
 Object evaluate(Object object)
           
<T> T
evaluate(Object object, Class<T> context)
           
 Literal getFallbackValue()
           
 String getName()
           
 List<Expression> getParameters()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_LINEAR

public static final String MODE_LINEAR
Use as a literal value to indicate interpolation mode

See Also:
Constant Field Values

MODE_COSINE

public static final String MODE_COSINE
Use as a literal value to indicate interpolation mode

See Also:
Constant Field Values

MODE_CUBIC

public static final String MODE_CUBIC
Use as a literal value to indicate interpolation mode

See Also:
Constant Field Values

METHOD_NUMERIC

public static final String METHOD_NUMERIC
Use as a literal value to indicate interpolation method

See Also:
Constant Field Values

METHOD_COLOR

public static final String METHOD_COLOR
Use as a literal value to indicate interpolation method

See Also:
Constant Field Values

RASTER_DATA

public static final String RASTER_DATA
Use as a PropertyName when defining a color map. The "Raterdata" is expected to apply to only a single band;

See Also:
Constant Field Values

NAME

public static final FunctionName NAME
Make the instance of FunctionName available in a consistent spot.

Constructor Detail

InterpolateFunction

public InterpolateFunction()

InterpolateFunction

public InterpolateFunction(List<Expression> parameters,
                           Literal fallback)
Method Detail

getName

public String getName()
Specified by:
getName in interface Function

getParameters

public List<Expression> getParameters()
Specified by:
getParameters in interface Function

accept

public Object accept(ExpressionVisitor visitor,
                     Object extraData)
Specified by:
accept in interface Expression

evaluate

public Object evaluate(Object object)
Specified by:
evaluate in interface Expression

evaluate

public <T> T evaluate(Object object,
                      Class<T> context)
Specified by:
evaluate in interface Expression

getFallbackValue

public Literal getFallbackValue()
Specified by:
getFallbackValue in interface Function


Copyright © 1996-2009 Geotools. All Rights Reserved.