Package org.geotools.coverage.processing
Class RangeSpecifier
- Object
-
- RangeSpecifier
-
- All Implemented Interfaces:
Serializable,Cloneable,Cloneable
public class RangeSpecifier extends Object implements Serializable, Cloneable
Argument type forDefaultProcessoroperations for specifying the range, colors and units of a computation result.RangeSpecifierare used for tuning theCategoryobject to be constructed. By default, most operations try to guess a raisonable range for output values. This default behavior can be overridden with an explicitRangeSpecifierargument.All
RangeSpecifier's properties are optional; it is up to processor's operation to replacenullvalues by a default one.- Since:
- 2.2
- Author:
- Martin Desruisseaux (IRD)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RangeSpecifier()Constructs a defaultRangeSpecifierwith no value set.RangeSpecifier(MathTransform1D transform)Constructs aRangeSpecifierinitialised to the specified "sample to geophysics" transform.RangeSpecifier(NumberRange<?> range)Constructs aRangeSpecifierinitialised to the spécified range.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RangeSpecifierclone()Returns a clone of this object.booleanequals(Object object)Compares this range specifier with the specified object for equality.Color[]getColors()Returns the target colors, ornullif none.NumberRange<?>getRange()Returns the target range, ornullif none.MathTransform1DgetSampleToGeophysics()Returns the target "sample to geophysics" transform, ornullif none.Unit<?>getUnit()Returns the target range units, ornullif none.inthashCode()Returns a hash code value for this range specifier.voidsetColors(Color[] colors)Set the target colors to the specified value.voidsetRange(NumberRange<?> range)Set the target range to the specified values.voidsetSampleToGeophysics(MathTransform1D transform)Set the target "sample to geophysics" transform to the specified value.voidsetUnit(Unit<?> unit)Set the target range units to the specified value.StringtoString()Returns a string representation of this range specifier.
-
-
-
Constructor Detail
-
RangeSpecifier
public RangeSpecifier()
Constructs a defaultRangeSpecifierwith no value set.
-
RangeSpecifier
public RangeSpecifier(NumberRange<?> range)
Constructs aRangeSpecifierinitialised to the spécified range.- Parameters:
range- The range
-
RangeSpecifier
public RangeSpecifier(MathTransform1D transform)
Constructs aRangeSpecifierinitialised to the specified "sample to geophysics" transform.- Parameters:
transform- The sample to geophysics transform.
-
-
Method Detail
-
getRange
public NumberRange<?> getRange()
Returns the target range, ornullif none.- Returns:
- The range
-
setRange
public void setRange(NumberRange<?> range)
Set the target range to the specified values. Setting this property will clear the sample to geophysics transform, since those properties are mutually exclusive.- Parameters:
range- The target range.
-
getSampleToGeophysics
public MathTransform1D getSampleToGeophysics()
Returns the target "sample to geophysics" transform, ornullif none.- Returns:
- The current sample to geophysics transform.
-
setSampleToGeophysics
public void setSampleToGeophysics(MathTransform1D transform)
Set the target "sample to geophysics" transform to the specified value. Setting this property will clear the range property, since those properties are mutually exclusive.- Parameters:
transform- The new sample to geophysics transform.
-
getUnit
public Unit<?> getUnit()
Returns the target range units, ornullif none.- Returns:
- The current units.
-
setUnit
public void setUnit(Unit<?> unit)
Set the target range units to the specified value.- Parameters:
unit- The new units.
-
getColors
public Color[] getColors()
Returns the target colors, ornullif none.- Returns:
- The current colors.
-
setColors
public void setColors(Color[] colors)
Set the target colors to the specified value.- Parameters:
colors- The new colors.
-
clone
public RangeSpecifier clone()
Returns a clone of this object.- Specified by:
clonein interfaceCloneable- Overrides:
clonein classObject- Returns:
- A clone of this object.
- See Also:
Object.clone()
-
hashCode
public int hashCode()
Returns a hash code value for this range specifier.
-
equals
public boolean equals(Object object)
Compares this range specifier with the specified object for equality.
-
-