org.geotools.renderer.lite.gridcoverage2d
Class LinearColorMapElement
java.lang.Object
org.geotools.referencing.piecewise.DefaultDomainElement1D
org.geotools.referencing.piecewise.DefaultPiecewiseTransform1DElement
org.geotools.referencing.piecewise.DefaultLinearPiecewiseTransform1DElement
org.geotools.renderer.lite.gridcoverage2d.LinearColorMapElement
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<DomainElement1D>, DomainElement1D, PiecewiseTransform1DElement, ColorMapTransformElement, org.opengis.referencing.operation.MathTransform, org.opengis.referencing.operation.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(java.lang.CharSequence name,
java.awt.Color[] colors,
NumberRange<? extends java.lang.Number> valueRange,
NumberRange<? extends java.lang.Number> sampleRange)
|
static LinearColorMapElement |
create(java.lang.CharSequence name,
java.awt.Color color,
double value,
int sample)
|
static LinearColorMapElement |
create(java.lang.CharSequence name,
java.awt.Color color,
float value,
int sample)
|
static LinearColorMapElement |
create(java.lang.CharSequence name,
java.awt.Color color,
int value,
int sample)
|
static LinearColorMapElement |
create(java.lang.CharSequence name,
java.awt.Color color,
NumberRange<? extends java.lang.Number> inRange,
int outVal)
|
static LinearColorMapElement |
create(java.lang.CharSequence name,
java.awt.Color color,
short value,
int sample)
|
boolean |
equals(java.lang.Object object)
Implementation of Object.equals(Object) for DomainElement1D s. |
java.awt.Color[] |
getColors()
Returns the set of colors for this category. |
protected java.lang.Class<?> |
getEquivalenceClass()
|
int |
hashCode()
Returns a hash value for this domain element. |
java.lang.String |
toString()
|
Methods inherited from class org.geotools.referencing.piecewise.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 org.geotools.referencing.piecewise.DefaultDomainElement1D |
compareTo, contains, contains, contains, getInputMaximum, getInputMinimum, getName, getRange, isInputMaximumInfinite, isInputMaximumNaN, isInputMinimumInfinite, isInputMinimumNaN |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
compareTo |
Methods inherited from interface org.opengis.referencing.operation.MathTransform1D |
derivative, inverse, transform |
Methods inherited from interface org.opengis.referencing.operation.MathTransform |
derivative, getSourceDimensions, getTargetDimensions, isIdentity, toWKT, transform, transform, transform, transform, transform |
create
public static LinearColorMapElement create(java.lang.CharSequence name,
java.awt.Color[] colors,
NumberRange<? extends java.lang.Number> valueRange,
NumberRange<? extends java.lang.Number> sampleRange)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
create
public static LinearColorMapElement create(java.lang.CharSequence name,
java.awt.Color color,
NumberRange<? extends java.lang.Number> inRange,
int outVal)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
create
public static LinearColorMapElement create(java.lang.CharSequence name,
java.awt.Color color,
short value,
int sample)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
- See Also:
LinearColorMapElement#ClassificationCategory(CharSequence,
Color[], NumberRange, NumberRange)
create
public static LinearColorMapElement create(java.lang.CharSequence name,
java.awt.Color color,
int value,
int sample)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
- See Also:
LinearColorMapElement#ClassificationCategory(CharSequence,
Color[], NumberRange, NumberRange)
create
public static LinearColorMapElement create(java.lang.CharSequence name,
java.awt.Color color,
float value,
int sample)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
- See Also:
LinearColorMapElement#ClassificationCategory(CharSequence,
Color[], NumberRange, NumberRange)
create
public static LinearColorMapElement create(java.lang.CharSequence name,
java.awt.Color color,
double value,
int sample)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
- See Also:
LinearColorMapElement#ClassificationCategory(CharSequence,
Color[], NumberRange, NumberRange)
equals
public boolean equals(java.lang.Object object)
- Description copied from class:
DefaultDomainElement1D
- Implementation of
Object.equals(Object)
for DomainElement1D
s.
Two DefaultDomainElement1D
s 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 java.awt.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()
toString
public java.lang.String toString()
- Overrides:
toString
in class DefaultLinearPiecewiseTransform1DElement
getEquivalenceClass
protected java.lang.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-2010 Geotools. All Rights Reserved.