Package org.geotools.coverage.grid
Class GridCoverageBuilder.Variable
- Object
-
- Variable
-
- Enclosing class:
- GridCoverageBuilder
public class GridCoverageBuilder.Variable extends Object
A variable to be mapped to a sample dimension. Variables are created byGridCoverageBuilder.newVariable(java.lang.CharSequence, javax.measure.Unit<?>)
.- Since:
- 2.5
- Author:
- Martin Desruisseaux
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Variable(CharSequence name, Unit<?> units)
Creates a new variable of the given name and units.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNodataValue(CharSequence name, int value)
Adds a "nodata" value.GridSampleDimension
getSampleDimension()
Returns a sample dimension for the current range of sample values.String
toString()
Returns a string representation of this variable.
-
-
-
Constructor Detail
-
Variable
protected Variable(CharSequence name, Unit<?> units)
Creates a new variable of the given name and units.- Parameters:
name
- The variable name, ornull
for a default name.units
- The variable units, ornull
if unknown.- See Also:
GridCoverageBuilder.newVariable(java.lang.CharSequence, javax.measure.Unit<?>)
-
-
Method Detail
-
addNodataValue
public void addNodataValue(CharSequence name, int value) throws IllegalArgumentException
Adds a "nodata" value.- Parameters:
name
- The name for the "nodata" value.value
- The pixel value to assign to "nodata".- Throws:
IllegalArgumentException
- if the given pixel value is already assigned.
-
getSampleDimension
public GridSampleDimension getSampleDimension()
Returns a sample dimension for the current range of sample values.
-
-