org.geotools.renderer.lite.gridcoverage2d
Class LinearColorMapElement

Object
  extended by DefaultDomainElement1D
      extended by DefaultPiecewiseTransform1DElement
          extended by DefaultLinearPiecewiseTransform1DElement
              extended by LinearColorMapElement
All Implemented Interfaces:
Serializable, Comparable<DomainElement1D>, DomainElement1D, PiecewiseTransform1DElement, ColorMapTransformElement, MathTransform, MathTransform1D

public class LinearColorMapElement
extends DefaultLinearPiecewiseTransform1DElement
implements PiecewiseTransform1DElement, ColorMapTransformElement

This LinearColorMapElement is a special implementation of both PiecewiseTransform1DElement and ColorMapTransformElement which can be used to do various types of classifications on raster. Specifically the supported types of classifications are unique values, classified and color ramps.

The supported types of classifications are LinearColorMap.LinearColorMapType.TYPE_RAMP , LinearColorMap.LinearColorMapType.TYPE_VALUES and LinearColorMap.LinearColorMapType.TYPE_INTERVALS .

Author:
Simone Giannecchini, GeoSolutions
See Also:
LinearColorMap, LinearColorMap.LinearColorMapType, Serialized Form

Method Summary
static LinearColorMapElement create(CharSequence name, Color[] colors, NumberRange<? extends Number> valueRange, NumberRange<? extends Number> sampleRange)
           
static LinearColorMapElement create(CharSequence name, Color color, double value, int sample)
           
static LinearColorMapElement create(CharSequence name, Color color, float value, int sample)
           
static LinearColorMapElement create(CharSequence name, Color color, int value, int sample)
           
static LinearColorMapElement create(CharSequence name, Color color, NumberRange<? extends Number> inRange, int outVal)
           
static LinearColorMapElement create(CharSequence name, Color color, short value, int sample)
           
 boolean equals(Object object)
          Implementation of Object.equals(Object) for DomainElement1Ds.
 Color[] getColors()
          Returns the set of colors for this category.
protected  Class<?> getEquivalenceClass()
           
 int hashCode()
          Returns a hash value for this domain element.
 String toString()
           
 
Methods inherited from class DefaultLinearPiecewiseTransform1DElement
getOffset, getOutputMaximum, getOutputMinimum, getOutputRange, getScale, isOutputMaximumInfinite, isOutputMaximumNaN, isOutputMinimumInfinite, isOutputMinimumNaN
 
Methods inherited from class DefaultPiecewiseTransform1DElement
create, create, create, create, create, create, create, derivative, derivative, getSourceDimensions, getTargetDimensions, getTransform, inverse, isIdentity, setInverse, setTransform, toWKT, transform, transform, transform, transform, transform, transform
 
Methods inherited from class DefaultDomainElement1D
compareTo, contains, contains, contains, getInputMaximum, getInputMinimum, getName, getRange, isInputMaximumInfinite, isInputMaximumNaN, isInputMinimumInfinite, isInputMinimumNaN
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface DomainElement1D
contains, contains, contains, getName, getRange
 
Methods inherited from interface Comparable
compareTo
 
Methods inherited from interface MathTransform1D
derivative, inverse, transform
 
Methods inherited from interface MathTransform
derivative, getSourceDimensions, getTargetDimensions, isIdentity, toWKT, transform, transform, transform, transform, transform
 

Method Detail

create

public static LinearColorMapElement create(CharSequence name,
                                           Color[] colors,
                                           NumberRange<? extends Number> valueRange,
                                           NumberRange<? extends Number> sampleRange)
                                    throws IllegalArgumentException
Throws:
IllegalArgumentException

create

public static LinearColorMapElement create(CharSequence name,
                                           Color color,
                                           NumberRange<? extends Number> inRange,
                                           int outVal)
                                    throws IllegalArgumentException
Throws:
IllegalArgumentException

create

public static LinearColorMapElement create(CharSequence name,
                                           Color color,
                                           short value,
                                           int sample)
                                    throws IllegalArgumentException
Throws:
IllegalArgumentException
See Also:
LinearColorMapElement#ClassificationCategory(CharSequence, Color[], NumberRange, NumberRange)

create

public static LinearColorMapElement create(CharSequence name,
                                           Color color,
                                           int value,
                                           int sample)
                                    throws IllegalArgumentException
Throws:
IllegalArgumentException
See Also:
LinearColorMapElement#ClassificationCategory(CharSequence, Color[], NumberRange, NumberRange)

create

public static LinearColorMapElement create(CharSequence name,
                                           Color color,
                                           float value,
                                           int sample)
                                    throws IllegalArgumentException
Throws:
IllegalArgumentException
See Also:
LinearColorMapElement#ClassificationCategory(CharSequence, Color[], NumberRange, NumberRange)

create

public static LinearColorMapElement create(CharSequence name,
                                           Color color,
                                           double value,
                                           int sample)
                                    throws IllegalArgumentException
Throws:
IllegalArgumentException
See Also:
LinearColorMapElement#ClassificationCategory(CharSequence, Color[], NumberRange, NumberRange)

equals

public boolean equals(Object object)
Description copied from class: DefaultDomainElement1D
Implementation of Object.equals(Object) for DomainElement1Ds.

Two DefaultDomainElement1Ds are considered to be equal if they have the same inputr range and the same name.

Specified by:
equals in interface DomainElement1D
Overrides:
equals in class DefaultLinearPiecewiseTransform1DElement
Parameters:
object - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
Object.equals(Object)

getColors

public Color[] getColors()
Returns the set of colors for this category. Change to the returned array will not affect this category.

Specified by:
getColors in interface ColorMapTransformElement
See Also:
GridSampleDimension.getColorModel()
UML property:
name="colors"

toString

public String toString()
Overrides:
toString in class DefaultLinearPiecewiseTransform1DElement

getEquivalenceClass

protected Class<?> getEquivalenceClass()
Overrides:
getEquivalenceClass in class DefaultLinearPiecewiseTransform1DElement

hashCode

public int hashCode()
Description copied from class: DefaultDomainElement1D
Returns a hash value for this domain element. This value need not remain consistent between different implementations of the same class.

Overrides:
hashCode in class DefaultLinearPiecewiseTransform1DElement


Copyright © 1996-2014 Geotools. All Rights Reserved.