Package com.luciad.imaging
Class TLcdBandMeasurementSemanticsBuilder
java.lang.Object
com.luciad.imaging.TLcdBandMeasurementSemanticsBuilder
Builder for creating
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();
- Since:
- 2015.0
-
Method Summary
Modifier and TypeMethodDescriptionall
(ALcdBandSemantics aSemantics) Sets all parameters on the builder based on the given semantics.build()
Builds a semantics for an image measurement band with the currently defined properties.dataType
(ALcdBandSemantics.DataType aDataType) Set the data type.Set the maximum allowed value, can benull
.Set the minimum allowed value, can benull
.Create a new measurement semantics builder.noDataValue
(Number aNoDataValue) Set the 'no data' value, can benull
.normalized
(boolean aNormalized) Set if the band is normalized.normalizedRangeMaxValue
(Number aNormalizedRangeMaxValue) Set the maximum value of the normalized range.normalizedRangeMinValue
(Number aNormalizedRangeMinValue) Set the minimum value of the normalized range.significantBits
(int aNumSignificantBits) Set the number of significant bits.unitOfMeasure
(ILcdISO19103UnitOfMeasure aUnitOfMeasure) Set the unit-of-measure.
-
Method Details
-
newBuilder
Create a new measurement semantics builder.- Returns:
- a new builder instance
-
build
Builds a semantics for an image measurement band with the currently defined properties.- Returns:
- the band measurement semantics
-
unitOfMeasure
Set the unit-of-measure. You can obtain instance usingTLcdUnitOfMeasureFactory
or by using the constants defined on implementations ofILcdISO19103UnitOfMeasure
. For terrain height you should use a unit with measure typeTLcdISO19103MeasureTypeCodeExtension.TERRAIN_HEIGHT
. For example for terrain height in meters this would become:builder.unitOfMeasure( TLcdUnitOfMeasureFactory.deriveUnitOfMeasure( TLcdAltitudeUnit.METRE, TLcdISO19103MeasureTypeCodeExtension.TERRAIN_HEIGHT ) );
- Parameters:
aUnitOfMeasure
- the unit-of-measure- Returns:
- this builder
- See Also:
-
dataType
Set the data type.- Parameters:
aDataType
- the data type- Returns:
- this builder
- See Also:
-
significantBits
Set the number of significant bits. By default the size in bits of thedata type
.- Parameters:
aNumSignificantBits
- the number of significant bits- Returns:
- this builder
- See Also:
-
noDataValue
Set the 'no data' value, can benull
.- Parameters:
aNoDataValue
- the 'no data' value- Returns:
- this builder
- See Also:
-
minValue
Set the minimum allowed value, can benull
.- Parameters:
aMinValue
- the minimum allowed value- Returns:
- this builder
- See Also:
-
maxValue
Set the maximum allowed value, can benull
.- Parameters:
aMaxValue
- the maximum allowed value- Returns:
- this builder
- See Also:
-
normalized
Set if the band is normalized. The default istrue
.- Parameters:
aNormalized
-true
if the band is normalized- Returns:
- this builder
- See Also:
-
normalizedRangeMinValue
Set the minimum value of the normalized range. By default the minimum value of the data type.- Parameters:
aNormalizedRangeMinValue
- the minimum value of the normalized range- Returns:
- this builder
- See Also:
-
normalizedRangeMaxValue
Set the maximum value of the normalized range. By default the maximum value of the data type.- Parameters:
aNormalizedRangeMaxValue
- the maximum value of the normalized range- Returns:
- this builder
- See Also:
-
all
Sets all parameters on the builder based on the given semantics. This is useful for example to create a new semantics that has almost all properties equal to another semantics.- Parameters:
aSemantics
- the semantics to copy- Returns:
this
-