public class TLcdBandMeasurementSemanticsBuilder extends Object
ALcdBandMeasurementSemantics
instances.
To build a new instance the unit of measure and the data type must be set on this builder.
Other properties are optional, they will get a default value based on the unit of measure and data type
that were set.
Example usage:
To create semantics representing unsigned short values in metres:
ALcdBandMeasurementSemantics semantics = TLcdBandMeasurementSemanticsBuilder
.newBuilder()
.unitOfMeasure(
TLcdUnitOfMeasureFactory.deriveUnitOfMeasure(
TLcdAltitudeUnit.METRE,
TLcdISO19103MeasureTypeCodeExtension.TERRAIN_HEIGHT
)
)
.dataType(ALcdBandSemantics.DataType.UNSIGNED_SHORT)
.build();
Modifier and Type | Method and Description |
---|---|
TLcdBandMeasurementSemanticsBuilder |
all(ALcdBandSemantics aSemantics)
Sets all parameters on the builder based on the given semantics.
|
ALcdBandMeasurementSemantics |
build()
Builds a semantics for an image measurement band with the currently defined properties.
|
TLcdBandMeasurementSemanticsBuilder |
dataType(ALcdBandSemantics.DataType aDataType)
Set the data type.
|
TLcdBandMeasurementSemanticsBuilder |
maxValue(Number aMaxValue)
Set the maximum allowed value, can be
null . |
TLcdBandMeasurementSemanticsBuilder |
minValue(Number aMinValue)
Set the minimum allowed value, can be
null . |
static TLcdBandMeasurementSemanticsBuilder |
newBuilder()
Create a new measurement semantics builder.
|
TLcdBandMeasurementSemanticsBuilder |
noDataValue(Number aNoDataValue)
Set the 'no data' value, can be
null . |
TLcdBandMeasurementSemanticsBuilder |
normalized(boolean aNormalized)
Set if the band is normalized.
|
TLcdBandMeasurementSemanticsBuilder |
normalizedRangeMaxValue(Number aNormalizedRangeMaxValue)
Set the maximum value of the normalized range.
|
TLcdBandMeasurementSemanticsBuilder |
normalizedRangeMinValue(Number aNormalizedRangeMinValue)
Set the minimum value of the normalized range.
|
TLcdBandMeasurementSemanticsBuilder |
significantBits(int aNumSignificantBits)
Set the number of significant bits.
|
TLcdBandMeasurementSemanticsBuilder |
unitOfMeasure(ILcdISO19103UnitOfMeasure aUnitOfMeasure)
Set the unit-of-measure.
|
public static TLcdBandMeasurementSemanticsBuilder newBuilder()
public ALcdBandMeasurementSemantics build()
public TLcdBandMeasurementSemanticsBuilder unitOfMeasure(ILcdISO19103UnitOfMeasure aUnitOfMeasure)
TLcdUnitOfMeasureFactory
or by using the constants defined on
implementations of ILcdISO19103UnitOfMeasure
. For terrain height you should use
a unit with measure type TLcdISO19103MeasureTypeCodeExtension.TERRAIN_HEIGHT
.
For example for terrain height in meters this would become:
builder.unitOfMeasure(
TLcdUnitOfMeasureFactory.deriveUnitOfMeasure(
TLcdAltitudeUnit.METRE,
TLcdISO19103MeasureTypeCodeExtension.TERRAIN_HEIGHT
)
);
aUnitOfMeasure
- the unit-of-measureALcdBandMeasurementSemantics.getUnitOfMeasure()
,
TLcdUnitOfMeasureFactory
public TLcdBandMeasurementSemanticsBuilder dataType(ALcdBandSemantics.DataType aDataType)
aDataType
- the data typeALcdBandSemantics.getDataType()
public TLcdBandMeasurementSemanticsBuilder significantBits(int aNumSignificantBits)
data type
.aNumSignificantBits
- the number of significant bitsALcdBandSemantics.getNumSignificantBits()
public TLcdBandMeasurementSemanticsBuilder noDataValue(Number aNoDataValue)
null
.aNoDataValue
- the 'no data' valueALcdBandSemantics.getNoDataValue()
public TLcdBandMeasurementSemanticsBuilder minValue(Number aMinValue)
null
.aMinValue
- the minimum allowed valueALcdBandSemantics.getMinValue()
public TLcdBandMeasurementSemanticsBuilder maxValue(Number aMaxValue)
null
.aMaxValue
- the maximum allowed valueALcdBandSemantics.getMaxValue()
public TLcdBandMeasurementSemanticsBuilder normalized(boolean aNormalized)
true
.aNormalized
- true
if the band is normalizedALcdBandSemantics.isNormalized()
public TLcdBandMeasurementSemanticsBuilder normalizedRangeMinValue(Number aNormalizedRangeMinValue)
aNormalizedRangeMinValue
- the minimum value of the normalized rangeALcdBandSemantics.getNormalizedRangeMinValue()
public TLcdBandMeasurementSemanticsBuilder normalizedRangeMaxValue(Number aNormalizedRangeMaxValue)
aNormalizedRangeMaxValue
- the maximum value of the normalized rangeALcdBandSemantics.getNormalizedRangeMaxValue()
public TLcdBandMeasurementSemanticsBuilder all(ALcdBandSemantics aSemantics)
aSemantics
- the semantics to copythis