|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.image.io.metadata.MetadataAccessor
org.geotools.image.io.metadata.Band
public class Band
A <SampleDimension>
element in
geographic metadata format.
SampleDimension
Constructor Summary | |
---|---|
protected |
Band(GeographicMetadata metadata,
int bandIndex)
Creates a parser for a band. |
Method Summary | |
---|---|
java.lang.String |
getName()
Returns the name for this band, or null if none. |
double[] |
getNoDataValues()
Returns the fill values for this band, or null if none. |
double |
getOffset()
Returns the offset from packed to geophysics values, or 0 if none. |
double |
getScale()
Returns the scale factor from packed to geophysics values, or 1 if none. |
NumberRange |
getValidRange()
Returns the range of valid values for this band. |
void |
setName(java.lang.String name)
Sets the name for this band. |
void |
setNoDataValues(double[] fillValues)
Sets the fill values for this band. |
void |
setOffset(double offset)
Sets the offset for this band. |
void |
setPackedValues(double minValue,
double maxValue,
double[] fillValues,
int dataType)
Defines valid and fill packed values as a combinaison of setValidRange(minValue, maxValue)
and {linkplain #setNoDataValues(double[]) setNoDataValues}(fillValues) . |
void |
setScale(double scale)
Sets the scale factor for this band. |
void |
setValidRange(double minValue,
double maxValue)
Sets the range of valid values. |
Methods inherited from class org.geotools.image.io.metadata.MetadataAccessor |
---|
appendChild, childCount, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubles, getAttributeAsInteger, getAttributeAsIntegers, getAttributeAsString, getUserObject, getUserObject, selectChild, selectParent, setAttributeAsDate, setAttributeAsDouble, setAttributeAsDoubles, setAttributeAsInteger, setAttributeAsIntegers, setAttributeAsString, setUserObject, setWarningsEnabled, toString, trimFractionalPart, warningOccurred |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Band(GeographicMetadata metadata, int bandIndex)
GeographicMetadata.getBand(int)
instead.
metadata
- The metadata which contains this band.bandIndex
- The band index for this instance.Method Detail |
---|
public java.lang.String getName()
null
if none.
public void setName(java.lang.String name)
name
- The band name, or null
if none.public NumberRange getValidRange()
Integer
type if possible, or the Double
type otherwise. Note that range
minimum value,
maximum value or both may be null if no
"minValue"
or "maxValue"
attribute were found for the
"SampleDimensions/SampleDimension"
element.
public void setValidRange(double minValue, double maxValue)
If the minimal or maximal value may be unknown, consider invoking
instead. The later can infers default bounds according a given data type.
setPackedValues
(minValue, maxValue, …)
minValue
- The minimal valid packed value,
or Double.NEGATIVE_INFINITY
if none.maxValue
- The maximal valid packed value,
or Double.POSITIVE_INFINITY
if none.setPackedValues(double, double, double[], int)
public double[] getNoDataValues()
null
if none.
public void setNoDataValues(double[] fillValues)
fillValues
- The packed values used for missing data, or null
if none.setPackedValues(double, double, double[], int)
public void setPackedValues(double minValue, double maxValue, double[] fillValues, int dataType)
setValidRange(minValue, maxValue)
and {linkplain #setNoDataValues(double[]) setNoDataValues}(fillValues)
.
If the minimal or maximal value is infinite and the data type is an integer type, then this method replaces the infinite values by default bounds inferred from the data type and the fill values.
minValue
- The minimal valid packed value,
or Double.NEGATIVE_INFINITY
if unknown.maxValue
- The maximal valid packed value,
or Double.POSITIVE_INFINITY
if unknown.fillValues
- The packed values used for missing data, or null
if none.dataType
- The raw data type as one of DataBuffer
constants, or
DataBuffer.TYPE_UNDEFINED
if unknown.setValidRange(double, double)
,
setNoDataValues(double[])
public double getScale()
1
if none.
public void setScale(double scale)
scale
- The scale from packed to geophysics values, or 1
if none.public double getOffset()
0
if none.
public void setOffset(double offset)
offset
- The offset from packed to geophysics values, or 0
if none.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |