A category delimited by a range of sample values. A categogy may be either
qualitative or
quantitative. For exemple, a classified image may have a qualitative category defining sample value {@code 0}as water. An other qualitative category may defines sample value {@code 1}as forest, etc. An other image may define elevation data as sample values in the range {@code [0..100]}. The later is a
quantitative category, because sample values are related to some measurement in the real world. For example, elevation data may be related to an altitude in metres through the following linear relation:
altitude =
sample value×100. Some image mixes both qualitative and quantitative categories. For example, images of Sea Surface Temperature (SST) may have a quantitative category for temperature with values ranging from 2 to 35°C, and three qualitative categories for cloud, land and ice.
All categories must have a human readable name. In addition, quantitative categories may define a transformation between sample values s and geophysics values x. This transformation is usually (but not always) a linear equation of the form:
x = {@linkplain GridSampleDimension#getOffset() offset} + {@linkplain GridSampleDimension#getScale() scale}×
s
More general equation are allowed. For example,
SeaWiFS images use a logarithmic transform. General transformations are expressed with a {@link MathTransform1D} object. In the special case where the transformationis a linear one (as in the formula above), then a {@code Category} objectmay be understood as the interval between two breakpoints in the JAI's {@linkplain javax.media.jai.operator.PiecewiseDescriptor piecewise} operation.
All {@code Category} objects are immutable and thread-safe.
@since 2.1
@source $URL$
@version $Id$
@author Martin Desruisseaux (IRD)
@see GridSampleDimension
@see javax.media.jai.operator.PiecewiseDescriptor